有没有办法重新加载我在 TestCafe 中访问的实际测试页面,而不是在 TestCafe 下运行的站点。我试过使用:
await t.eval(() => location.reload(true));
Run Code Online (Sandbox Code Playgroud)
但这只会重新加载 TestCafe 使用的服务器页面。例如,如果我测试www.google.com,启动 TestCafe 后浏览器中的 URL 将类似于http://172.16.0.152:58486/Qf6eMxOvA/https:/www.google.com/ 那就是当我执行上面的代码时重新加载的站点。有没有办法强制重新加载www.google.com来实际模拟重新加载测试页面?
当我需要等待某个元素变得可见时,可以简单地将选择器作为如下函数调用:
await element.with({ visibilityCheck: true })();
Run Code Online (Sandbox Code Playgroud)
但是如何等待元素消失呢?
在我们的Web应用程序上部署后不久,我们便进行了烟雾测试。有时,首次登录需要花费一段时间才能登录页面。
- Error in Role initializer -
Failed to complete a request to "https://myurl.com/account/login/" within the
timeout period. The problem may be related to local machine's network or
firewall settings, server outage, or network problems that make the server inaccessible.
Run Code Online (Sandbox Code Playgroud)
我希望setPageTimeout在“角色” 中添加可以解决此问题,但是,直到星期二我才能确认。
任何人都可以确认是否setPageTimeout要走吗?如果没有,是否有可用的解决方案?
- Error in Role initializer -
Failed to complete a request to "https://myurl.com/account/login/" within the
timeout period. The problem may be related to local machine's network or
firewall settings, …Run Code Online (Sandbox Code Playgroud) Testcafe 测试未在 Ubuntu(AWS 机器)中运行
我已经为所有可用的浏览器执行了以下命令
testcafe "chrome" abc.js
testcafe "chrome:headless" abc.js
testcafe "firefox" abc.js
testcafe "firefox:headless" abc.js
testcafe "chromium" abc.js
testcafe "chromium:headless" abc.js
Run Code Online (Sandbox Code Playgroud)
我收到以下执行 testcafe 命令的错误消息
错误:没有要运行的测试。要么测试文件不包含测试,要么过滤功能太严格。
我想编写一个夹具来模拟导出文件并确保从浏览器操作中下载文件。任何例子?
不适用
我正在运行 TestCafe docker,希望查看浏览器,以便我知道发生了什么,并且默认情况下不以无头模式运行它。是否可以?
automated-tests browser-automation docker e2e-testing testcafe