0
votes

Exception in thread "main" java.lang.IllegalStateException: 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

2
System.setProperty("webdriver.chrome.Driver","E:\\Selenium WorkSpace\\chromedriver.exe"); WebDriver d = new ChromeDriver(); - Yashodhan Sonawane

2 Answers

0
votes

Write "webdriver.chrome.driver" instead of "webdriver.chrome.Driver"

Just lowercase instead of uppercase.

0
votes

When you are setting the properties, you can't use uppercase

System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "/chromedriver.exe");
WebDriver driver = new ChromeDriver();

user.dir will take you to the current working directory.

Let me know if it works for you.