Skip to content

Instantly share code, notes, and snippets.

@mattyoho
Created May 1, 2012 02:43
Show Gist options
  • Save mattyoho/2564591 to your computer and use it in GitHub Desktop.
Save mattyoho/2564591 to your computer and use it in GitHub Desktop.
Capybara test confirm
# http://stackoverflow.com/questions/2458632/how-to-test-a-confirm-dialog-with-cucumber
page.evaluate_script('window.confirm = function() { return true; }')
page.click('Remove')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment