Selenium WebDriverException using ChromeDriver v2.23 and Chrome v52

The latest version of Chrome v52.0.2743.116 seems to have affected our tests, which use Selenium with Chrome. Earlier we updated the version of the chrome grille through the Selenium NuGet package if an update appeared in Chrome. The latests driver mentions that it is compatible with v52.

A call to create a ChromeDriver (OpenQA.Selenium, Chrome) fails, as shown

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.

Stack trace:

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

Our code on line 59 looks like this:

ScenarioContext.Current["webDriverChrome"] = new ChromeDriver(path);

This passes the path to the chromedriver.exe file.

These tests worked until the version of Chrome upgraded from v51 to v52. He worked on ChromeDriver version 2.19 (Selenium NuGet 2.19.0.0), so we upgraded to 2.23 (Selenium NuGet 2.23.0.1), which shows that it works with v52, but we get an exception.

Thoughtworks GO, , .

+4

Source: https://habr.com/ru/post/1650798/


All Articles