lib/spreewald/web_steps.rb in spreewald-0.5.16 vs lib/spreewald/web_steps.rb in spreewald-0.5.17

- old
+ new

@@ -521,9 +521,14 @@ alert = page.driver.browser.switch_to.alert alert.send_keys(text) alert.accept end +When /^I switch to the new tab$/ do + Capybara::current_driver == :selenium or raise("This step works only with selenium") + page.driver.browser.switch_to.window(page.driver.browser.window_handles.last) +end + # Checks that these strings are rendered in the given order in a single line or in multiple lines # # Example: # # Then I should see in this order: