Class: FillIN::Input
- Inherits:
-
Object
- Object
- FillIN::Input
- Defined in:
- lib/cucumber/pickles/steps/fill_in/input.rb
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) ⇒ Input
constructor
A new instance of Input.
Constructor Details
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
3 4 5 |
# File 'lib/cucumber/pickles/steps/fill_in/input.rb', line 3 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/cucumber/pickles/steps/fill_in/input.rb', line 3 def value @value end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cucumber/pickles/steps/fill_in/input.rb', line 11 def call case input.native.attribute("type") when "radio", "checkbox" Pickles.select_input(input, @value) when "file" Pickles.attach_file(input, @value) else # password email tel ... input.set(@value) end input end |