Recently I was updating the UI tests in a project now Selenium Webdriver plays nice with .NET Core. And came across a strange error:
What made this a strange error is it is a failure to communicate with the Webdriver Server, not my underlying application and because of this failure in communication Webdriver could not manipulate my website.
After some googling, this turns out to be a straightforward fix – my project uses the Chromedriver server as it’s Webdriver for tests and simply the Chromedriver server executable I had locally was out of date when compared to my installed version of Chrome. So the fix was to download the latest version.
Manually Managing Chromedriver
I wouldn’t have come across this error if I chose to include a Nuget package to download the latest version of Chromedriver for me and in a lot of scenarios, this is the sensible choice but what I like about managing the file myself is it isn’t going to be updated accidentally by Nuget somehow – it is pinned hard at its current version and without my intervention that won’t change. But given the error above and how long it might have taken to figure out… perhaps I should reconsider!