Class: Watir::CheckBox
- Inherits:
-
Object
- Object
- Watir::CheckBox
- Defined in:
- lib/watir-formhandler/check_box.rb
Overview
Extends the Watir::Checkbox class with set and field_value methods.
Instance Method Summary collapse
-
#field_value ⇒ Boolean
Returns whether this CheckBox is set or not.
-
#set(value) ⇒ Boolean
Will click the CheckBox unless the #checked? returns the same value as the given one.
Instance Method Details
#field_value ⇒ Boolean
Returns whether this CheckBox is set or not.
17 18 19 |
# File 'lib/watir-formhandler/check_box.rb', line 17 def field_value checked? end |
#set(value) ⇒ Boolean
Will click the CheckBox unless the #checked? returns the same value as the given one.
10 11 12 |
# File 'lib/watir-formhandler/check_box.rb', line 10 def set(value) click unless !!value == checked? end |