# File lib/capybara/rack_test/node.rb, line 52 def click if tag_name == 'a' method = self["data-method"] if driver.options[:respect_data_method] method ||= :get driver.follow(method, self[:href].to_s) elsif (tag_name == 'input' and %w(submit image).include?(type)) or ((tag_name == 'button') and type.nil? or type == "submit") Capybara::RackTest::Form.new(driver, form).submit(self) end end