Method: Capybara::Node::Actions#click_link
- Defined in:
- lib/capybara/node/actions.rb
#click_link(locator) ⇒ Object
Finds a link by id or text and clicks it. Also looks at image alt text inside the link.
25 26 27 28 |
# File 'lib/capybara/node/actions.rb', line 25 def click_link(locator) msg = "no link with title, id or text '#{locator}' found" find(:xpath, XPath::HTML.link(locator), :message => msg).click end |