Module: CheckBoxHelper
- Defined in:
- lib/watir_helper/checkbox_helper.rb
Instance Method Summary collapse
-
#clear_checkbox(browser_handle, property, property_value) ⇒ Object
Clear a checkbox.
-
#click_checkbox(browser_handle, property, property_value) ⇒ Object
Click a checkbox.
-
#exists_checkbox?(browser_handle, property, property_value) ⇒ Boolean
Check whether a checkbox exists or not.
-
#flash_checkbox(browser_handle, property, property_value) ⇒ Object
Highlight or Flash a checkbox.
-
#is_checkbox_checked?(browser_handle, property, property_value) ⇒ Boolean
Check whether a checkbox is checked/set or not.
Instance Method Details
#clear_checkbox(browser_handle, property, property_value) ⇒ Object
Clear a checkbox.
14 15 16 |
# File 'lib/watir_helper/checkbox_helper.rb', line 14 def clear_checkbox(browser_handle, property, property_value) browser_handle.checkbox(property.intern, /#{property_value}/).clear end |
#click_checkbox(browser_handle, property, property_value) ⇒ Object
Click a checkbox.
9 10 11 |
# File 'lib/watir_helper/checkbox_helper.rb', line 9 def click_checkbox(browser_handle, property, property_value) browser_handle.checkbox(property.intern, /#{property_value}/).set end |
#exists_checkbox?(browser_handle, property, property_value) ⇒ Boolean
Check whether a checkbox exists or not.
24 25 26 |
# File 'lib/watir_helper/checkbox_helper.rb', line 24 def exists_checkbox?(browser_handle, property, property_value) browser_handle.checkbox(property.intern, /#{property_value}/).exists? end |
#flash_checkbox(browser_handle, property, property_value) ⇒ Object
Highlight or Flash a checkbox.
19 20 21 |
# File 'lib/watir_helper/checkbox_helper.rb', line 19 def flash_checkbox(browser_handle, property, property_value) browser_handle.checkbox(property.intern, /#{property_value}/).flash end |
#is_checkbox_checked?(browser_handle, property, property_value) ⇒ Boolean
Check whether a checkbox is checked/set or not.
29 30 31 |
# File 'lib/watir_helper/checkbox_helper.rb', line 29 def is_checkbox_checked?(browser_handle, property, property_value) browser_handle.checkbox(property.intern, /#{property_value}/).checked? end |