Skip to content

Instantly share code, notes, and snippets.

@mattyoho
Forked from rgo/Confirm dialog selenium
Created June 11, 2010 13:37
Show Gist options
  • Save mattyoho/434476 to your computer and use it in GitHub Desktop.
Save mattyoho/434476 to your computer and use it in GitHub Desktop.
Given /^I will confirm on next step$/ do
begin
evaluate_script("window.alert = function(msg) { return true; }")
evaluate_script("window.confirm = function(msg) { return true; }")
rescue Capybara::NotSupportedByDriverError
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment