Method: Capybara::Node::Actions#click_button
- Defined in:
- lib/capybara/node/actions.rb
#click_button(locator) ⇒ Object
Finds a button by id, text or value and clicks it.
36 37 38 39 |
# File 'lib/capybara/node/actions.rb', line 36 def (locator) msg = "no button with value or id or text '#{locator}' found" find(:xpath, XPath::HTML.(locator), :message => msg).click end |