I understand that there are a few ways to create a new Chrome driver instance, and the way that has worked best for me is passing in its location as a parameter (new ChromeDriver(“path”, capabilities)). However, I am now wanting to move to testing on a VM and I want to run the driver from the default location (C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe as seen on the documentation). I am running Windows 7 and when I run my test (debug and non-debug modes) through VS2010 the error message suggests it is looking in the ‘TestResults\Out’ folder and thus cannot find the driver.
Is this a VS2010 issue or have I done something wrong?
Also apologise if this has been answered before, all the other posts I found thus far have not helped 🙁
EDIT: Or is it necessary to specifically state the Chrome install path on Win7? I guess I could do this, but would prefer things to be a default area just in case a future VM default install path is different.
Its not about where the Chrome is. Its about where chromedriver.exe is.
You have to set up the
webdriver.chrome.driverinto your system variables. In Windows (XP):Control Panel -> System -> Tab Advanced -> Environment Variables -> New
Variable name:
webdriver.chrome.driverVariable value:
C:\path\to\chromedriver\chromedriver.exeSee screen here: http://twio.cz/ae0n
ChromeDriver can be downloaded here