Class: FireWatir::CheckboxGroup
- Includes:
- RadioCheckGroup, Watir::CheckboxGroupCommonWatir
- Defined in:
- lib/watirloo/extension/firewatir_ducktape.rb
Instance Method Summary collapse
-
#initialize(container, name) ⇒ CheckboxGroup
constructor
A new instance of CheckboxGroup.
- #name ⇒ Object
-
#selected_values ⇒ Object
which values are selected?.
Methods included from Watir::CheckboxGroupCommonWatir
#selected_checkboxes, #selected_value, #set?
Methods included from RadioCheckGroup
Methods included from Watir::RadioCheckGroupCommonWatir
#[], #get_by_position, #get_by_value, #set, #size, #values
Constructor Details
#initialize(container, name) ⇒ CheckboxGroup
Returns a new instance of CheckboxGroup.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/watirloo/extension/firewatir_ducktape.rb', line 91 def initialize(container, name) @container = container @name = name @o = [] @container.checkboxes.each do |cb| #TODO find why find_all does not work if cb.name == @name @o << cb end end end |
Instance Method Details
#name ⇒ Object
102 103 104 |
# File 'lib/watirloo/extension/firewatir_ducktape.rb', line 102 def name @name end |
#selected_values ⇒ Object
which values are selected?
107 108 109 110 111 112 113 |
# File 'lib/watirloo/extension/firewatir_ducktape.rb', line 107 def selected_values values = [] selected_checkboxes.each do |cb| values << cb.value end return values end |