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 元素,則運行自動化,然后繼續下一個條件,但實際情況是不斷失敗并在第一個條件下停止。屏幕
TestCafe 條件 if else web 元素如果第一個失敗如何繼續下一個條件
jeck貓
2022-12-22 09:36:58