TestCafe支持:1。基于窗口的弹出处理程序? 2。我们如何将硒(Java)代码迁移到Testcafe?
我正在寻找针对以下2个方案的Tescafe支持:
- 我们如何处理基于窗户的幼崽?
- 有什么方法可以将硒(Java)脚本/代码迁移到TestCafe?
感谢您提前回复。
温暖的问候, Abhinav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的弹出窗口基于JavaScript窗口,则可以使用以下方法来处理这些窗口:
https://testcafe.io/documentation/402677/reference/test- API/testController/SwitchTowIndow
请参阅以下帮助主题以获取更多详细信息: https://testcafe.io/402900/402900/resources/blog/2020-8-26-introducing-multi-window-window-tests-tests-beta-beta#header 。
至于从硒迁移,在自动模式下不可能。您需要自己重写测试。
If your popup is based on javascript windows, you can use the following methods to handle these windows:
https://testcafe.io/documentation/402677/reference/test-api/testcontroller/switchtowindow
https://testcafe.io/documentation/402694/reference/test-api/testcontroller/openwindow#header
https://testcafe.io/documentation/402709/reference/test-api/testcontroller/closewindow
Please refer to the following help topic for more details: https://testcafe.io/402900/resources/blog/2020-8-26-introducing-multi-window-tests-beta#header.
As for migration from Selenium, it's not possible in automatic mode. You need to rewrite your tests yourself.