Class: Capybara::Mechanize::Node
- Inherits:
-
RackTest::Node
- Object
- RackTest::Node
- Capybara::Mechanize::Node
- Defined in:
- lib/capybara/mechanize/node.rb
Instance Method Summary collapse
Instance Method Details
#click ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/capybara/mechanize/node.rb', line 2 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") ::Mechanize::Form.new(driver, form).submit(self) end end |