HELP!! Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Users\tarin\JAVA-practice\Tutorial2\‪C:\Test Automation\Jars\chromedriver.exe

0 votes

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

public class WebDriver_Demo {

public static void main(String[] args) throws Exception {

System.setProperty("webdriver.chrome.driver", "‪C:\\Test Automation\\Jars\\chromedriver.exe");

WebDriver driver = new ChromeDriver();

driver.get("https://google.com");

Thread.sleep(5000);

driver.close();

}

}

Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Users\tarin\JAVA-practice\Tutorial2\‪C:\Test Automation\Jars\chromedriver.exe

at com.google.common.base.Preconditions.checkState(Preconditions.java:585)

at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:146)

at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141)

at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:35)

at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:159)

at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355)

at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:94)

at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)

at WebDriver_Demo.main(WebDriver_Demo.java:11)

May 15, 2019 in Selenium by anonymous
• 120 points

reshown May 15, 2019 by Omkar 2,180 views

1 answer to this question.

0 votes

Hi as I can see in your code that the path you have mentioned for your Chrome driver is:

System.setProperty("webdriver.chrome.driver", "‪C:\\Test Automation\\Jars\\chromedriver.exe");

While the error is showing this path:

Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Users\tarin\JAVA-practice\Tutorial2\‪C:\Test Automation\Jars\chromedriver.exe 

So can you please check if if your have set the right path for your Chrome driver? May be that would resolve your issue.

answered May 17, 2019 by Abha
• 27,720 points

Related Questions In Selenium

0 votes
0 answers
+1 vote
0 answers

Exception in thread "main" java.lang.IllegalStateException

package Program; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class ...READ MORE

5 days ago in Selenium by taruna
• 130 points
29 views
0 votes
1 answer

getting java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property

Hi Sivaranjani, to resolve your issue, Driver path ...READ MORE

answered Sep 3, 2019 in Selenium by Abha
• 27,720 points
656 views
0 votes
1 answer

How should I configure the chromedriver.exe in eclipse

Use the page factory pattern, working example: public ...READ MORE

answered Mar 27, 2018 in Selenium by Atul
• 5,530 points
6,404 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
1,495 views
0 votes
1 answer
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,690 points
434 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,850 points
1,465 views