Several sources refer to downloading ChromeDriver binary from the class path, but I have not developed how to do this if the binary is not in the root directory of the path.
To specify the path to the binary, you need to set the system property "webdriver.chrome.driver". First I tried:
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
But I have an error, and it looks like he was looking for a driver in a location "C:\<working directory of my application process>\drivers\Chrome\chromedriver.exe". Here, the working directory was actually the directory in which my source code is stored.
Then I tried:
System.setProperty("webdriver.chrome.driver", "/drivers/Chrome/chromedriver.exe");
However, the same thing happened - this time he looked in "C:\drivers\Chrome\chromedriver.exe".
How do I get ChromeDriver to look for the ChromeDriver binary in the classpath when using the "webdriver.chrome.driver" property or any other way to configure it?
source
share