Class: FillIN::ComplexInput
- Inherits:
-
Object
- Object
- FillIN::ComplexInput
- Includes:
- Pickles
- Defined in:
- lib/cucumber/pickles/steps/fill_in/complex_input.rb
Constant Summary
Constants included from Pickles
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(label, value, within) ⇒ ComplexInput
constructor
A new instance of ComplexInput.
Methods included from Pickles
Methods included from Helpers::Main
#attach_file, #blur, #parent_node, #select_input, #trigger
Methods included from Waiter
page, pending_ajax_requests_num, wait, wait_for_ajax
Methods included from NodeFinders
#_rescued_find, #detect_node, #find_input, #find_node
Constructor Details
#initialize(label, value, within) ⇒ ComplexInput
7 8 9 10 11 |
# File 'lib/cucumber/pickles/steps/fill_in/complex_input.rb', line 7 def initialize(label, value, within) @label = label @value = value @within = within || .current_session end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/cucumber/pickles/steps/fill_in/complex_input.rb', line 5 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/cucumber/pickles/steps/fill_in/complex_input.rb', line 5 def value @value end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/cucumber/pickles/steps/fill_in/complex_input.rb', line 13 def call @value.split(/\s*:\s*/).each.with_index do |value, index| input_locator = "#{label}[#{index}]" FillIN::Input.new(input_locator, value, @within) end end |