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 元素,则运行自动化,然后继续下一个条件,但实际情况是不断失败并在第一个条件下停止。
jeck猫
哆啦的时光机
随时随地看视频慕课网APP
相关分类