Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Then /^(.+) and I confirm dialog box$/ do |step|
bypass_confirm_dialog
Then step
end
module JsHelpers
def bypass_confirm_dialog
# bypassing the confirm dialog
# http://groups.google.com/group/ruby-capybara/browse_thread/thread/89760b6fcab7fd19
# http://stackoverflow.com/questions/2458632/how-to-test-a-confirm-dialog-with-cucumber
page.evaluate_script('window.confirm = function() { return true; }')
end
end
@javascript
Scenario: Lorem ipsum
...
When I press "Delete" and I confirm dialog box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.