Selenium ChromeDriver exception after upgrading chrome to version 63

We have an automated Selenium solution for some routine works on an admin panel. It was working until yesterday suddenly it broke. Navigation is fine:

driver.Navigate().GoToUrl(url); // this works just fine

However, this line breaks:

var inputs = driver.FindElements(By.CssSelector("input"));

And the exception message is:

Unexpected error. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:2110
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   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.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByCssSelector(String cssSelector)
   at OpenQA.Selenium.By.<>c__DisplayClass1e.<CssSelector>b__1c(ISearchContext context)
   at OpenQA.Selenium.By.FindElement(ISearchContext context)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)

I have no idea what is the reason of this problem. Since version 63 of Chrome is forcing HSTS, I thought maybe there is something wrong with chromedriver.exe because of huge changes in Chrome 63. Please help.

Upvotes: 2

Views: 570

Answers (1)

Ross Jackson
Ross Jackson

Reputation: 46

suit's comment appears to be correct (thank you). I had the latest WebDriver nuget packages installed, but not the latest chromedriver.exe. Version 2.34 has fixed it.

ChromeDriver Download Page

Upvotes: 3

Related Questions