Exception in thread “main” org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: chromedriver, error chromedriver must exist: D:selenium-java-4.20.0(2)selenium-chrome-driver-4.20.0
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: ‘4.20.0’, revision: ‘866c76ca80’
System info: os.name: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘18.0.2.1’
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:121)
at org.openqa.selenium.remote.service.DriverFinder.getDriverPath(DriverFinder.java:55)
at org.openqa.selenium.chrome.ChromeDriver.generateExecutor(ChromeDriver.java:99)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:88)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:83)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:51)
at NewClass.main(NewClass.java:13)
Caused by: java.lang.IllegalStateException: chromedriver must exist: D:selenium-java-4.20.0(2)selenium-chrome-driver-4.20.0
at org.openqa.selenium.internal.Require$FileStateChecker.isFile(Require.java:346)
at org.openqa.selenium.internal.Require$FileStateChecker.isExecutable(Require.java:368)
at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:118)
… 6 more
Process finished with exit code 1
The version is the latest and the path to the file is correct
Анастасия Цурикова is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.