java.lang.IllegalStateException: The driver executable does not exist: while trying to execute tests through Selenium, ChromeDriver and Chrome

Solution 1:

put chrome driver at
C:\Users\xxxxx\Downloads\chromedriver.exe
and set same path in code System.setProperty("webdriver.chrome.driver","C:\Users\xxxxx\Downloads\chromedriver.exe");

Solution 2:

As error says, there is no executable driver exists in the path you have written.

  1. Make sure, that driver still exists in the path.
  2. Try to replace driver(if exists) in another folder and change path in the code
  3. Reinstall driver and set new path in the code

PS: this is not a valid location:

E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe

Solution 3:

This error message...

java.lang.IllegalStateException: The driver executable does not exist: E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe

...implies that the JVM was unable to find the ChromeDriver in the effective location as per the configuration mentioned within your code.

As per your code trial, you have mentioned the location of the ChromeDriver as:

C:\Users\xxxxx\Downloads\chromedriver.exe

But when your testcase gets executed the effective location is considered as:

E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe

So, there are some configuration within your code block or IDE configuration or OS PATH variable which modifies the absolute path of the ChromeDriver binary. Addressing this issue will solve your problem.

Solution 4:

This problem problem caused by special character in your path - f.e. some folder name contains 'ą' or 'ś' or space