# File lib/scrubyt/core/navigation/agents/mechanize.rb, line 232 def self.find_form_based_on_tag(tag, possible_attrs) lookup_attribute_name = nil lookup_attribute_value = nil possible_attrs.each { |a| lookup_attribute_name = a lookup_attribute_value = tag.attributes[a] break if lookup_attribute_value != nil } i = 0 loop do @@current_form = FetchAction.get_mechanize_doc.forms[i] return nil if @@current_form == nil break if @@current_form.form_node.attributes[lookup_attribute_name] == lookup_attribute_value i+= 1 end end