Class: Cucumber::Salad::Widgets::FieldGroup::CheckBox
- Defined in:
- lib/cucumber/salad/widgets/field_group.rb
Overview
A check box.
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
-
#get ⇒ Boolean
true
if the checkbox is checked,false
otherwise. -
#set(value) ⇒ Object
Checks or unchecks the current checkbox.
- #to_s ⇒ Object
Methods inherited from Field
Methods inherited from Widget
find_in, #has_action?, #initialize, #inspect, present_in?, #reload, root, selector
Methods included from Cucumber::Salad::WidgetMacros
#action, #widget, #widget_delegator
Methods included from Cucumber::Salad::WidgetContainer
Constructor Details
This class inherits a constructor from Cucumber::Salad::Widgets::Widget
Instance Method Details
#get ⇒ Boolean
Returns true
if the checkbox is checked, false
otherwise.
280 281 282 |
# File 'lib/cucumber/salad/widgets/field_group.rb', line 280 def get !! root.checked? end |
#set(value) ⇒ Object
Checks or unchecks the current checkbox.
276 |
# File 'lib/cucumber/salad/widgets/field_group.rb', line 276 def_delegator :root, :set |
#to_s ⇒ Object
285 286 287 |
# File 'lib/cucumber/salad/widgets/field_group.rb', line 285 def to_s get ? 'yes' : 'no' end |