“pageRequestTimeout” 究竟是什么意思?

huangapple go评论86阅读模式
英文:

What does pageRequestTimeout exactly mean?

问题

pageRequestTimeout。指定等待HTML页面的时间(以毫秒为单位)。如果TestCafe在指定的时间内未收到页面,它会抛出错误。

这份文档仍然不清楚对我来说TestCafe到底在等待什么?

testcafe版本:2.5.0
node版本:v16.19.0
浏览器:chrome

我遇到了问题,试图找出确切的原因。

无法加载网页"https://xxx/"。
      增加“pageRequestTimeout”变量的值,启用“retryTestPages”选项,或使用隔离模式进行额外尝试以执行此测试。
      您可以在"https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx"找到此问题的故障排除信息。
      错误详情:
      未能在超时期间完成对"https://xxx/"的请求。问题可能与本地机器的网络或防火墙设置、服务器停机或使服务器无法访问的网络问题有关。

pageRequestTimeout设置为30000,启用了隔离模式。问题在于网站加载,在超时后,TestCafe将我重定向到一个空白的“about:error”页面。手动打开网站时,一切正常。

英文:

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.

This documentation is still not clear to me what is exactly testcafe waits for there?

testcafe: 2.5.0
node: v16.19.0
browser: chrome

I have issues saying and trying to figure out the exact reason.

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 is 30000, quarantine mode is on. What's happening is the site is loading and after timeout period testcafe just redirects me to blank "about:error" page. Manually the site opens fine.

答案1

得分: 1

The pageRequestTimeout选项在TestCafe中指定了HTML页面加载的超时时间(以毫秒为单位),在超时后会引发错误。在您的情况下,似乎TestCafe无法在指定的30秒超时期内加载指定的URL,因此它会引发错误。

错误消息表明问题可能与本地计算机的网络或防火墙设置、服务器故障或使服务器不可访问的网络问题有关。有可能您尝试加载的页面由于网络问题或服务器问题而加载时间较长,或者您本地计算机的防火墙设置阻止了页面的加载。

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

英文:

The pageRequestTimeout option in TestCafe specifies the time duration (in milliseconds) for which TestCafe waits for an HTML page to load before timing out and throwing an error. In your case, it seems that TestCafe is not able to load the page at the specified URL within the timeout period of 30 seconds, and hence it is throwing the error.

The error message suggests that the problem may be related to the local machine's network or firewall settings, server outage, or network problems that make the server inaccessible. It is possible that the page you are trying to load is taking longer to load due to network issues or server problems, or that your local machine's firewall settings are blocking the page from loading.

To troubleshoot the issue, you can try increasing the value of the pageRequestTimeout option, enabling the retryTestPages option, or using quarantine mode to perform additional attempts to execute the test. You can also try accessing the page manually to check if it loads correctly and if there are any network or firewall issues on your machine.

答案2

得分: 0

你可以在官方文档中查看描述 - https://testcafe.io/documentation/402638/reference/configuration-file#pagerequesttimeout。如果页面在没有使用TestCafe的情况下正常工作,那么可能是TestCafe的问题。在这种情况下,你可以在TestCafe GitHub仓库中创建一个问题

英文:

You can see the description in the official documentation - https://testcafe.io/documentation/402638/reference/configuration-file#pagerequesttimeout. If the page works correctly without TestCafe, then it can be a TestCafe issue. In this case, you can create an issue in the TestCafe GitHub repository.

huangapple
  • 本文由 发表于 2023年5月10日 16:04:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76216184.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定