# File lib/scrubyt/core/navigation/agents/mechanize.rb, line 225 def self.lookup_form_for_tag(tag, widget_name, name_attribute, query_string, index=0) Scrubyt.log :ACTION, "typing #{query_string} into the #{widget_name} named '#{name_attribute}'" widget = (FetchAction.get_hpricot_doc/"#{tag}[@name=#{name_attribute}]").map()[index] form_tag = Scrubyt::XPathUtils.traverse_up_until_name(widget, 'form') find_form_based_on_tag(form_tag, ['name', 'id', 'action']) end