【发布时间】:2021-03-09 22:16:01
【问题描述】:
我有一组自动化测试,它们打开一个子窗口+单击一个按钮关闭子窗口,然后导致页面导航。断言 URL 结果为Failed to restore connection to window within the allocated timeout.
// In child window
await t.typeText(<field>, 'text').click(<submitButton>);
// Main window
await t.expect(getCurrentUrl()).contains('thank_you')
我这里的假设是TestCafe仍然相信它在子窗口中,无需等待窗口关闭,以及后续的页面导航。
我可以添加一些验证,以确保我们回到主窗口...但我想知道是否有针对此问题的内置解决方案? (我在文档中看不到任何内容)。
【问题讨论】:
标签: javascript testing automated-tests e2e-testing testcafe