Method: RWebUnit::Assert#assert_link_present_with_text
- Defined in:
- lib/rwebunit/assert.rb
#assert_link_present_with_text(link_text) ⇒ Object
Assert a link containing specified text in the page
<a href="">Click Me</a>
assert_link_present_with_text("Click ") # =>
70 71 72 73 74 75 |
# File 'lib/rwebunit/assert.rb', line 70 def assert_link_present_with_text(link_text) @web_browser.links.each { |link| return if link.text.include?(link_text) } fail( "can't find the link containing text: #{link_text}") end |