更新时间:2021-09-09 23:21:45
您可以通过以下方式检查 if 条件中的async exists 属性:
if
exists
You can check the async exists property in the if condition in the following way:
if(await things.thingSelector(thingName).exists) { // do something }
Nightwatchjs:如何在不创建错误/失败/异常的情况下检查元素是否存在
TestCafe - 如何在不失败测试的情况下检查Web元素是否存在?