【发布时间】:2020-08-05 05:34:34
【问题描述】:
if (btnSubmit.exists) {
await t
.click(btnSubmit) //this failed due to button not exist actual is stopped in here
} else if (buttonOK.exists) {
await t
.click(buttonOK) //i want to continue to execute this button which is exist
} else {
console.log("foo")
}
我有类似这样的简单代码,如果第一个条件未找到 web 元素,则运行自动化,然后继续下一个条件,但实际是保持失败并在第一个条件下停止。
【问题讨论】:
标签: javascript testing automated-tests e2e-testing testcafe