Class: FillIN::JsSelect
- Inherits:
-
Object
- Object
- FillIN::JsSelect
- Defined in:
- lib/cucumber/pickles/steps/fill_in/js_select.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(label, value, within) ⇒ JsSelect
constructor
A new instance of JsSelect.
Constructor Details
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cucumber/pickles/steps/fill_in/js_select.rb', line 9 def call locator, index = Locator::Index.execute(@value) locator, xpath = Locator::Equal.execute(locator) index ||= 1 input = FillIN::Input.new(@label, locator, @within).call Waiter.wait do # prev version "(./ancestor::*[#{xpath}][#{index}]/#{xpath})[#{index}]" input.find(:xpath, "(./ancestor::*[#{xpath}]/#{xpath})[#{index}]").click end Pickles.blur(input) Waiter.wait_for_ajax input end |