Module: ButtonHelper
- Defined in:
- lib/watir_helper/button_helper.rb
Instance Method Summary collapse
-
#click_button(browser_handle, property, property_value) ⇒ Object
Click a button.
-
#click_button_with_popup(browser_handle, property, property_value) ⇒ Object
Click a button ,after clicking which a pop-up will come.
-
#double_click_button(browser_handle, property, property_value) ⇒ Object
Double Click a button.
-
#double_click_button_with_popup(browser_handle, property, property_value) ⇒ Object
Double Click a button, after clicking it a pop-up will come.
-
#exists_button?(browser_handle, property, property_value) ⇒ Boolean
Check whether a button exists or not.
-
#flash_button(browser_handle, property, property_value) ⇒ Object
Highlight or Flash a button.
Instance Method Details
#click_button(browser_handle, property, property_value) ⇒ Object
Click a button.
9 10 11 |
# File 'lib/watir_helper/button_helper.rb', line 9 def (browser_handle, property, property_value) browser_handle.(property.intern, /#{property_value}/).click end |
#click_button_with_popup(browser_handle, property, property_value) ⇒ Object
Click a button ,after clicking which a pop-up will come.
14 15 16 |
# File 'lib/watir_helper/button_helper.rb', line 14 def (browser_handle, property, property_value) browser_handle.(property.intern, /#{property_value}/).click_no_wait end |
#double_click_button(browser_handle, property, property_value) ⇒ Object
Double Click a button.
19 20 21 |
# File 'lib/watir_helper/button_helper.rb', line 19 def (browser_handle, property, property_value) browser_handle.(property.intern, /#{property_value}/).fire_event("ondblclick") end |
#double_click_button_with_popup(browser_handle, property, property_value) ⇒ Object
Double Click a button, after clicking it a pop-up will come.
24 25 26 |
# File 'lib/watir_helper/button_helper.rb', line 24 def (browser_handle, property, property_value) browser_handle.(property.intern, /#{property_value}/).fire_event_no_wait("ondblclick") end |
#exists_button?(browser_handle, property, property_value) ⇒ Boolean
Check whether a button exists or not.
34 35 36 |
# File 'lib/watir_helper/button_helper.rb', line 34 def (browser_handle, property, property_value) browser_handle.(property.intern, /#{property_value}/).exists? end |
#flash_button(browser_handle, property, property_value) ⇒ Object
Highlight or Flash a button.
29 30 31 |
# File 'lib/watir_helper/button_helper.rb', line 29 def (browser_handle, property, property_value) browser_handle.(property.intern, /#{property_value}/).flash end |