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 16, 2019 in Selenium by anonymous
• 120 points

reshown May 16, 2019 by Omkar 13,545 views

2 answers 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
• 28,140 points
Not working even after path change
0 votes
Use "‪C:\\Test Automation\\Jars\\chromedriver."\\chromedriver.exe" just added chromedriver one more time
answered Aug 13, 2020 by Anil

Related Questions In Selenium

0 votes
1 answer

Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: how to solve it?

Your query is similar to https://www.edureka.co/community/46570/illegalstateexception-executable-automation-chromedriver Check it ...READ MORE

answered Nov 6, 2020 in Selenium by Sirajul
• 59,230 points
3,320 views
0 votes
0 answers
0 votes
1 answer

Exception in thread "main" java.lang.IllegalStateException

Your query is similar to the following ...READ MORE

answered Mar 17, 2020 in Selenium by Sirajul
• 59,230 points
3,424 views
0 votes
1 answer

Exception in thread "main" java.lang.IllegalStateException

Your Query is similar to https://www.edureka.co/community/5617 ...READ MORE

answered Apr 13, 2020 in Selenium by Sirajul
• 59,230 points
1,469 views
0 votes
2 answers

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,500 points
13,763 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,184 views
0 votes
2 answers

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

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

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,932 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,910 points
7,258 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP