selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Browser not invoking getting error The driver executable does not exist at path

Open priyankakul07 opened this issue 8 years ago • 5 comments

Meta -

OS: Windows 10 64 bit Selenium Version:
Eclipse: oxygen 3a Java version 1.8.4 64 bit Browser: Chrome Chrome driver installed latest -->

Expected Behavior - Browser should invoke and hit the given url

Actual Behavior - Below error is displayed

Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\workspace\Intro\‪‪D:\chromedriver\chromedriver.exe at com.google.common.base.Preconditions.checkState(Preconditions.java:585) at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:137) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:132) at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:35) at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:156) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:346) at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:91) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:123) at pacakage1.seleniumintro.main(seleniumintro.java:12)

Steps to reproduce -

code: package pacakage1;

import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver;

public class seleniumintro {

public static void main(String[] args) {
	// TODO Auto-generated method stub

System.setProperty("webdriver.chrome.driver","‪‪D:\chromedriver\chromedriver.exe"); WebDriver driver = new ChromeDriver();

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

		}

	}	

priyankakul07 avatar Jul 27 '18 06:07 priyankakul07

This is because you have some invisible Unicode in your chromedriver.exe filepath. Escaped, your code looks like this:

System.setProperty("webdriver.chrome.driver","\u202A\u202AC:\\dev\\tools\\selenium\\chromedriver.exe");

The \u202A character is invisible and does nothing useful here. It might have found its way into your code like this.

The Security dialog box inserts that control character in the file name field in order to ensure that the path components are interpreted in the expected manner. Unfortunately, it also means that if you try to copy the text out of the dialog box, the Unicode formatting control character comes along for a ride. Since the character is normally invisible, it can create all sorts of silent confusion.

ben-yocum avatar Jul 27 '18 23:07 ben-yocum

Thanks for feedback Please let me know what steps i have to follow to make it work

priyankakul07 avatar Jul 29 '18 05:07 priyankakul07

Just delete the extra invisible characters. If you put your text cursor in front of the C: you should be able to delete the characters using either the backspace key or the delete key. It'll look like nothing happened when you press the button, but actually it deleted the invisible character. Remember to do it twice so you get both invisible characters.

If that's not working, just delete the whole line and retype it by hand with no copy-paste.

ben-yocum avatar Jul 29 '18 15:07 ben-yocum

This is a question rather than an issue. Please send questions to the selenium user group

barancev avatar Jul 29 '18 18:07 barancev

@GitSage Thanks its working . . . .

apurvagraw avatar Apr 06 '19 13:04 apurvagraw