I have come across a few people with the same issue that seemed to have solved the problem with System.addProperty(\"webdriver.chrome.driver\", \".../chromedriver.exe\");<
This was a challenging one to isolate - the clue is in the nuget source which contains Selenium.WebDriver.ChromeDriver.targets - the targets requires an explicit property assignment so chromedriver.exe
is never copied to vstest.console
deployment directory. Here is the fix to add to your CSPROJ file:
PublishChromeDriver
Property in CSPROJ
MyUX.Tests
True
After this property is defined, a copy of chromedriver.exe
will be copied to /bin
for vstest.console
. This fixes the error we were receiving:
chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html