WebDriver: ChromeDriver tries to reach http: // localhost / session on initialization and crash

Full error message:

 Test(s) failed. OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http://localhost:59662/session timed out after 60 seconds.
  ----> System.Net.WebException : The operation has timed out

The line in my code where this happens simply calls an instance of a new instance of ChromeDriver:

CurrentDriver = new ChromeDriver(section["chromedriverfolder"]);

So my question is: why is the new ChromeDriver calling the / session url and what could cause it to crash?

0
source share
2 answers

I experienced this same error using Selenium.WebDriver.ChromeDriver v2.22 and Chrome v52.0.2743.116 m running on TeamCity 9.x. I was able to fix the problem by dropping the version of Chrome run by TeamCity agents to version v51.

, , : " Chrome Automation . , ".

Chrome Selenium.WebDriver.ChromeDriver, , found

EDIT: ChromeDriver

EDIT2:

+2

, ChromeDriver URL-/session, , . , , : ChromeDriver() RemoteWebDriver :

super(new DriverCommandExecutor(service), capabilities);

:

public RemoteWebDriver(CommandExecutor executor, Capabilities desiredCapabilities,
      Capabilities requiredCapabilities) {

startClient,

startClient :

startSession(desiredCapabilities, requiredCapabilities);

/ :

Response response = execute(DriverCommand.NEW_SESSION, parameters);

DriverCommand.NEW_SESSION newSession, / Command Codec

defineCommand(NEW_SESSION, post("/session"));
0

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


All Articles