为什么对远程 WebDriver 服务器的 HTTP 请求在 60 秒后超时,尽管 commandTimeout 为 120 秒?

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

在 BrowserStack 上的 Android 上的 Chrome 上测试 Web 应用程序时,即使我将

OneTimeSetUp: OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://hub-cloud.browserstack.com/wd/hub/session timed out after 60 seconds
传递给更长的驱动程序,我偶尔也会收到错误
commandTimeout

new AndroidDriver(
    myUrl,
    myDriverOptions,
    commandTimeout: TimeSpan.FromMinutes(2)
)

我读过但自己没有设置的其他超时是:

  • 异步JavaScript - 默认:0:30
  • 隐式等待 - 默认:0:00
  • 页面加载 - 默认:3:20

所以不应该有任何60秒的超时。这是从哪里来的?我可以做什么来预防它?

不幸的是,我没有得到正确的堆栈跟踪,只是这样:

OneTimeSetUp: OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://hub-cloud.browserstack.com/wd/hub/session timed out after 60 seconds.
  ----> System.Threading.Tasks.TaskCanceledException : The request was canceled due to the configured HttpClient.Timeout of 60 seconds elapsing.
  ----> System.TimeoutException : The operation was canceled.
  ----> System.Threading.Tasks.TaskCanceledException : The operation was canceled.
  ----> System.IO.IOException : Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request..
  ----> System.Net.Sockets.SocketException : The I/O operation has been aborted because of either a thread exit or an application request.

selenium-webdriver browserstack
1个回答
0
投票

请使用 BrowserStack 创建支持票证。您可以使用 https://www.browserstack.com/contact#technical-support

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