且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

TestCafe - 如何在不失败测试的情况下检查Web元素是否存在?

更新时间:2021-09-09 23:21:45

您可以通过以下方式检查 if 条件中的async exists 属性:

You can check the async exists property in the if condition in the following way:

if(await things.thingSelector(thingName).exists) {
    // do something 
}