Class: FillIN::Select
- Inherits:
-
Object
- Object
- FillIN::Select
- Defined in:
- lib/cucumber/pickles/steps/fill_in/select.rb
Overview
When /^select “(.*)” from “(.*)”$/ do |value, label|
select value, from: label
end
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(label, value, within) ⇒ Select
constructor
A new instance of Select.
Constructor Details
#initialize(label, value, within) ⇒ Select
Returns a new instance of Select.
7 8 9 10 11 |
# File 'lib/cucumber/pickles/steps/fill_in/select.rb', line 7 def initialize(label, value, within) @label = label @value = value @within = within || .current_session end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/cucumber/pickles/steps/fill_in/select.rb', line 13 def call locator, wait = Locator::Wait.execute(@label) locator, index = Locator::Index.execute(locator) = { from: locator } [:wait] = wait if wait @within.select @value, end |