lib/cucumber/pickles/steps/fill_in/js_select.rb in pickles-0.2.0 vs lib/cucumber/pickles/steps/fill_in/js_select.rb in pickles-0.2.1

- old
+ new

@@ -5,18 +5,19 @@ @value = value @within = within || Capybara.current_session end def call - input = FillIN::Input.new(@label, @value, @within).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 - input.find(:xpath, "./ancestor::*[#{xpath}][#{index}]/#{xpath}").click + # prev version "(./ancestor::*[#{xpath}][#{index}]/#{xpath})[#{index}]" + input.find(:xpath, "(./ancestor::*[#{xpath}]/#{xpath})[#{index}]").click end Pickles.blur(input) Waiter.wait_for_ajax