【发布时间】:2021-01-21 20:44:38
【问题描述】:
我遇到了一个问题,链接需要一段时间才能出现在屏幕上,但下一步(即单击链接)执行不会等到元素出现。因此它失败了。我尝试添加等待时间,但它并没有等待那么久。无法理解可能是什么问题。任何帮助表示赞赏。
async Action() {
await this.t.click(this.Selector(".execution"),{ timeout: 50000 });
}
甚至尝试添加 等待 this.t.wait(100000000000);
仍然可以正常工作。 任何帮助表示赞赏
【问题讨论】:
-
您需要等待。以下是一些示例代码,但用 python 编写:seleniumbyexamples.github.io/wait
-
您可以尝试使用 visbilityCheck 例如:stackoverflow.com/a/62880176/12250510
-
也试过了,但效果很好:(
-
请贴出页面的测试代码和HTML。
标签: javascript selenium automation ui-automation testcafe