Module: LinkHelper

Defined in:
lib/watir_helper/link_helper.rb

Instance Method Summary collapse

Instance Method Details

Click a link.



9
10
11
# File 'lib/watir_helper/link_helper.rb', line 9

def click_link(browser_handle, property, property_value)
  browser_handle.link(property.intern, /#{property_value}/).click
end

Click a link ,after clicking which a pop-up will come.



14
15
16
# File 'lib/watir_helper/link_helper.rb', line 14

def click_link_with_popup(browser_handle, property, property_value)
  browser_handle.link(property.intern, /#{property_value}/).click_no_wait
end

#exists_link?(browser_handle, property, property_value) ⇒ Boolean

Check whether a link exists or not.

Returns:

  • (Boolean)


24
25
26
# File 'lib/watir_helper/link_helper.rb', line 24

def exists_link?(browser_handle, property, property_value)
  browser_handle.link(property.intern, /#{property_value}/).exists?
end

Highlight or Flash a link.



19
20
21
# File 'lib/watir_helper/link_helper.rb', line 19

def flash_link(browser_handle, property, property_value)
  browser_handle.link(property.intern, /#{property_value}/).flash
end