Method: RWebUnit::Assert#assert_link_present_with_exact
- Defined in:
- lib/rwebunit/assert.rb
#assert_link_present_with_exact(link_text) ⇒ Object
Assert a link with specified text (exact match) in the page
<a href="">Click Me</a>
assert_link_present_with_exact("Click Me") => true
assert_link_present_with_exact("Click") => false
52 53 54 55 56 57 |
# File 'lib/rwebunit/assert.rb', line 52 def assert_link_present_with_exact(link_text) @web_browser.links.each { |link| return if link_text == link.text } fail( "can't find the link with text: #{link_text}") end |