I\'m trying to test a JS confirmation dialog with Cucumber on Rails. I have a window.onbeforeunload event handler that will prompt you with a confirmation dialog if you try to n
See the method definitions in http://selenium-client.rubyforge.org/classes/Selenium/Client/Idiomatic.html
You can invoke them with the selenium helper object in your Cucumber step definitions -- e.g.,
Then /^I should see a JS confirm dialog saying "([^\"]*)"$/ do |statement|
selenium.confirmation.should eql(statement)
end