Unable to open Chrome browser - #Error#The driver executable does not exist
Meta -
OS: Windows 10 , 64- bit Selenium Version : 2.53.0 Browser: Google Chrome Browser Version: Version 50.0.2661.94 m
Expected Behavior - Expecting Chrome browser to open and operations to be performed
Actual Behavior - Chrome browser is not opening even if chromedriver file is present in the specified path and getting below exception
java.lang.IllegalStateException: The driver executable does not exist: C:\Users\sharma\Desktop\chromedriver.exe
Steps to reproduce -
Step 1: Download the latest version of ChromeDriver file from the path -> http://chromedriver.storage.googleapis.com/index.html?path=2.21/ Step 2: Write the script to automate any functionality in chrome browser. Here is the script which I executed: import org.junit.Test; import org.openqa.selenium.chrome.ChromeDriver;
public class EbayApp {
@Test
public void EbaGC(){
System.setProperty("webdriver.chrome.driver","C:\Users\sharma\Desktop\chromedriver.exe");
ChromeDriver oEbayGC = new ChromeDriver();
oEbayGC.manage().window().maximize();
oEbayGC.get("http://www.ebay.com/");
oEbayGC.findElementById("gh-ac").sendKeys("Camera");
oEbayGC.findElementById("gh-btn").click();
oEbayGC.findElementByLinkText("Daily Deals").click();
}
}
Obviously, error says that there is no C:\Users\sharma\Desktop\chromedriver.exe available. Please check your chromedriver installation and use correct path to executable.
chromedriver executable file is present in the same path which I mentioned above. But still, getting the below exception. Please help me out here java.lang.IllegalStateException: The driver executable does not exist
Add "C:\Users\sharma\Desktop" to PATH
Same thing is happening to me. Is there any answer to this?
@andigylle23 it needs to be on your PATH
@cgoldberg Yes, it was on my path. I am using it through local.On my pom.xml,
<at.driver.type>LOCAL</at.driver.type>
<at.driver.local>CHROME</at.driver.local>
<at.driver.path>/opt/chrome/chromedriver</at.driver.path>
It was just a careless mistake of copy and paste. I switched with ubuntu, so my driver was still chromedriver.exe. Sorry, I didn't realize it soon enough. So by downloading the correct chromedriver it was fixed.