Google chrome 使用ChromeDriver v2.23和Chrome v52的Selenium WebDriverException
Chrome v52.0.2743.116的最新版本似乎影响了我们使用硒和铬的测试。我们之前已经通过Selenium NuGet包更新了chromedriver版本,如果Chrome有更新的话。最新的驱动程序提到与v52兼容 调用构造ChromeDriver(OpenQA.Selenium,Chrome)失败,如图所示Google chrome 使用ChromeDriver v2.23和Chrome v52的Selenium WebDriverException,google-chrome,selenium,selenium-chromedriver,Google Chrome,Selenium,Selenium Chromedriver,Chrome v52.0.2743.116的最新版本似乎影响了我们使用硒和铬的测试。我们之前已经通过Selenium NuGet包更新了chromedriver版本,如果Chrome有更新的话。最新的驱动程序提到与v52兼容 调用构造ChromeDriver(OpenQA.Selenium,Chrome)失败,如图所示 OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for U
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:9220/session timed out after 60 seconds. ---> System.Net.WebException: The request was aborted: The operation has timed out.
堆栈跟踪是:
at System.Net.HttpWebRequest.GetResponse()
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
--- End of inner exception stack trace ---
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(String chromeDriverDirectory, ChromeOptions options)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(String chromeDriverDirectory)
at InternalPortal.IntegrationTests.Helpers.WebBrowser.get_Current() in C:\GoAgent\pipelines\WHSLE_IntFacing_CustPortal_Commit\Source\InternalPortal.IntegrationTests\Helpers\WebBrowser.cs:line 59
第59行的代码如下所示:
ScenarioContext.Current["webDriverChrome"] = new ChromeDriver(path);
这将传递chromedriver.exe文件所在的路径
这些测试在Chrome版本从v51升级到v52之前一直有效。它在ChromeDriver版本2.19(Selenium NuGet 2.19.0.0)上工作,因此我们升级到2.23(Selenium NuGet 2.23.0.1),这显示为与v52一起工作,但我们看到了异常
测试通过Thoughtworks GO代理运行,如果有帮助,则由管道作业触发
谢谢
杰森我认为你应该看看这里:最好的,jpsfs