Yashodhan Sonawane
Yashodhan Sonawane

Reputation: 1

Not able to launch Chrome browser using Selenium Webdriver

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

Upvotes: 0

Views: 2054

Answers (2)

Anuj Teotia
Anuj Teotia

Reputation: 1323

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.

Upvotes: 0

ATA
ATA

Reputation: 51

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

Just lowercase instead of uppercase.

Upvotes: 0

Related Questions