Chome Driver exception | Selenium Forum
P
Poornima K P Posted on 15/12/2020

I am getting the below exception while trying to open Chrome browser:

 

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at org.openqa.selenium.internal.Require$StateChecker.nonNull(Require.java:254)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:142)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:37)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:222)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:405)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:119)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:105)
at Day02.TestSelenium.main(TestSelenium.java:8)

 

Code:

 

package Day02;

import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class TestSelenium {
public static void main(String[] args) {
new ChromeDriver();
}
}

 


A
Ashish Replied on 16/12/2020

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable The path to the driver executable must be set.

 

This eror means you have not set chrome driver correctly. You need to set the path of chrome driver exe

Please watch video again


Related Posts