开发者

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")

:-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜