Ruby on Rails: Cucumber: how to verify javascript alert text?
So, my app has a javascript aler开发者_Python百科t... how do I, using cucumber and / or capybara, test that the alert hay a particular string?
Try Cucumber + Webrat + Selenium. You can then write statements like
selenium.is_alert_present.should be_true
selenium.get_alert.should eql("File Deleted")
:-)
精彩评论