0

Guys Please Help Me in The Morning it Was Working Fine Suddenly While i Was Running Test, it asked Me a Popup to Allow Access. Why i Dont Know. First i Cancelled That Pop up after again i Run The Test and Gave Access. From That Time Chrome Driver is Not Opening.

img

Error Stack Trace :

java.lang.IllegalStateException: The driver executable does not exist: E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:121)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:116)
at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
at Lead.FinalTest.beforeTest(FinalTest.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.TestRunner.beforeRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:616)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
3
  • 1
    Looks like a 'cut-and-paste' problem with your single quotes and now it can't find the driver. Try moving it to a location without spaces. Commented Jul 31, 2018 at 7:09
  • @radimpe Sorry Man! i Cant Get it What Your Saying. Can You Show an Example of What Your Saying? Commented Jul 31, 2018 at 7:15
  • According to me, you have to reinstall chrome browser. Commented Jul 31, 2018 at 7:25

4 Answers 4

3

put chrome driver at
C:\Users\xxxxx\Downloads\chromedriver.exe
and set same path in code System.setProperty("webdriver.chrome.driver","C:\Users\xxxxx\Downloads\chromedriver.exe");

Sign up to request clarification or add additional context in comments.

Comments

2

As error says, there is no executable driver exists in the path you have written.

  1. Make sure, that driver still exists in the path.
  2. Try to replace driver(if exists) in another folder and change path in the code
  3. Reinstall driver and set new path in the code

PS: this is not a valid location:

E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe

1 Comment

Ok Fine, I'll Try With Reinstalling The Driver and Check it!
1

This error message...

java.lang.IllegalStateException: The driver executable does not exist: E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe

...implies that the JVM was unable to find the ChromeDriver in the effective location as per the configuration mentioned within your code.

As per your code trial, you have mentioned the location of the ChromeDriver as:

C:\Users\xxxxx\Downloads\chromedriver.exe

But when your testcase gets executed the effective location is considered as:

E:\Workspace\xxxxxxxxx\‪‪C:\Users\xxxxx\Downloads\chromedriver.exe

So, there are some configuration within your code block or IDE configuration or OS PATH variable which modifies the absolute path of the ChromeDriver binary. Addressing this issue will solve your problem.

6 Comments

Thanks Man! Got It !
@koushick Glad to be able to help you !!! Upvote the answer if this/any answer is/was helpful to you for the benefit of the future readers.
May i Know How To Check Which Issue Came Because of This?
@koushick Because of this issue the JVM was looking at the wrong place for the ChromeDriver and on being unsuccessful throws an error as IllegalStateException
@koushick it will be tough to guess how the os path E:\Workspace\xxxxxxxxx\‪‪ is getting appended to the desired os path C:\Users\xxxxx\Downloads\chromedriver.exe. Most possibly some configuration within the config file within your project.
|
1

This problem problem caused by special character in your path - f.e. some folder name contains 'ą' or 'ś' or space

1 Comment

it is better to provide full solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.