0

A colleague of mine is using Eclipse Photon on Windows 10. When they specify the ChromeDriver location to run a Selenium test, they get an error like:

java.lang.IllegalStateException: The driver executable does not exist: C:\eclipse-project-folder\?C:\some-path\chromedriver.exe

...where we specified this in the VM arguments section of the run configuration:

-Dwebdriver.chrome.driver=C:\some-path\chromedriver.exe

In particular, the ? gets my attention. We've tried putting chromedriver.exe in a couple of places, each of them in paths without spaces, but it always ends up with this kind of appended path in the error. Is there something we're missing in terms of configuration or something?

As an alternative, we specified a system environment variable for chromedriver.exe and added it to the Windows Path variable, but it didn't recognize that either, asking us to specify the webdriver.chrome.driver property as usual.

11
  • Try this : -Dwebdriver.chrome.driver=C:\\some-path\\chromedriver.exe Commented Feb 20, 2019 at 17:14
  • We did. We also tried putting the entire path in quotes, but that didn't work either ☹ Commented Feb 20, 2019 at 18:42
  • We ultimately upgraded the ChromeDriver version and checked out the latest code and that fixed it. I'm not sure exactly what it was but it's fixed now... ??? Commented Feb 21, 2019 at 15:02
  • I'm now encountering this problem with another co-worker's computer, and upgrading ChromeDriver didn't work this time... ☹ Commented Mar 28, 2019 at 14:32
  • 3
    This issue looks to be the exact same and is related to having an invisible unicode character at the start of your path from a copy paste: issue. You could try retyping the path to check if this works. Commented Apr 2, 2019 at 21:18

2 Answers 2

2
+50

I was able to reproduce the issue by placing ? before the driver path. But I am sure you might have checked this. Just try to copy paste the path to the notepad and then take it from there when you are working with the paths, by this way you don't end-up appending some invisible chars that might cause this kinds of issues.

enter image description here

If you update the system environment variable any time, make sure to restart the system. So that the variables are up to date.

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

1 Comment

Copy-pasting to Notepad (not Notepad++) helped! Invisible characters indeed. This came from the Properties window -> Security tab -> Object name
1

Try forward slashes. It works for me.

-Dwebdriver.chrome.driver=C:/some-path/chromedriver.exe

Comments

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.