# File lib/capybara/rack_test/node.rb, line 49
  def click
    if tag_name == 'a'
      method = self["data-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