Selenium can't find chromedriver.exe Selenium can't find chromedriver.exe selenium selenium

Selenium can't find chromedriver.exe


I can't explain why it works this way but this is how I got it to work.

IWebDriver driver = new ChromeDriver(".");

I initially copied the driver into the same directory as my Program.cs and passed in the path to the driver like so:

IWebDriver driver = new ChromeDriver("chromedriver.exe");

That resulted in this message:

The file chromedriver.exe\chromedriver.exe does not exist.

So just for kicks I tried passing in "." for the path and it worked.

This is probably a better solution. The driver needs to be in the same directory as your app code. Not in the /bin directory and this will work.

IWebDriver driver = new ChromeDriver(Directory.GetCurrentDirectory());


I was also facing the same issue and i have fixed it by this way.

First find the version of your Chrome.

Help-> About Google Chrome. There you will find your version number.

then copy URL provided below and place your current Chrome version number into those inverted comma, Then hit Enter. It will directly redirect you to latest download.

https://chromedriver.storage.googleapis.com/index.html?path=" "/ (full URL)Download Zip, Extract it and implement.