开发者

Ruby on Rails: Cucumber: how to verify javascript alert text?

开发者 https://www.devze.com 2023-01-05 06:28 出处:网络
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 state

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

精彩评论

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