【发布时间】:2019-04-27 12:38:26
【问题描述】:
testcafe 是否可以预期点击失败?
我正在使用 testcafe 工作室。
在我点击页面上的提交按钮后,我想要进行测试以确保页面上不再有某些文本。
最好的方法是什么?
谢谢
【问题讨论】:
标签: testing automated-tests e2e-testing testcafe web-testing
testcafe 是否可以预期点击失败?
我正在使用 testcafe 工作室。
在我点击页面上的提交按钮后,我想要进行测试以确保页面上不再有某些文本。
最好的方法是什么?
谢谢
【问题讨论】:
标签: testing automated-tests e2e-testing testcafe web-testing
在您的测试场景中,您可以使用exists Selector 属性:
Selector('h1').withText('Some text').exists
【讨论】: