Module: LinkHelper
- Defined in:
- lib/watir_helper/link_helper.rb
Instance Method Summary collapse
-
#click_link(browser_handle, property, property_value) ⇒ Object
Click a link.
-
#click_link_with_popup(browser_handle, property, property_value) ⇒ Object
Click a link ,after clicking which a pop-up will come.
-
#exists_link?(browser_handle, property, property_value) ⇒ Boolean
Check whether a link exists or not.
-
#flash_link(browser_handle, property, property_value) ⇒ Object
Highlight or Flash a link.
Instance Method Details
#click_link(browser_handle, property, property_value) ⇒ Object
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_link_with_popup(browser_handle, property, property_value) ⇒ Object
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.
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 |
#flash_link(browser_handle, property, property_value) ⇒ Object
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 |