pageRequestTimeout到底是什么意思?

问题描述 投票:0回答:1

pageRequestTimeout. Specifies time (in milliseconds) to wait for HTML pages. If TestCafe does not receive a page within the specified period, it throws an error.

我仍然不清楚这个文档究竟是什么 testcafe 在那里等待?

测试咖啡厅:2.5.0 节点:v16.19.0 浏览器:chrome

我有问题说和试图找出确切的原因。

Failed to load the page at "https://xxx/".
      Increase the value of the "pageRequestTimeout" variable, enable the "retryTestPages" option, or use quarantine mode to perform additional attempts to execute this test.
      You can find troubleshooting information for this issue at "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx".
      Error details:
      Failed to complete a request to "https://xxx/" 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.

pageRequestTimeout 为 30000,隔离模式开启。发生的事情是网站正在加载,超时后 testcafe 将我重定向到空白的“about:error”页面。手动打开网站。

javascript node.js google-chrome automated-tests testcafe
1个回答
0
投票

TestCafe 中的 pageRequestTimeout 选项指定了 TestCafe 在超时和抛出错误之前等待 HTML 页面加载的持续时间(以毫秒为单位)。在您的情况下,TestCafe 似乎无法在 30 秒的超时期限内加载指定 URL 的页面,因此它会抛出错误。

错误信息提示问题可能与本地机器的网络或防火墙设置、服务器中断或网络问题导致服务器无法访问有关。由于网络问题或服务器问题,您尝试加载的页面可能需要更长的时间才能加载,或者您本地计算机的防火墙设置阻止了页面加载。

要解决此问题,您可以尝试增加 pageRequestTimeout 选项的值,启用 retryTestPages 选项,或者使用隔离模式执行额外的尝试来执行测试。您也可以尝试手动访问该页面以检查它是否正确加载以及您的计算机上是否存在任何网络或防火墙问题。

© www.soinside.com 2019 - 2024. All rights reserved.