Issue
I have downloaded te latest chromedriver 2.46 and extracted the chrome driver but it has no .exe extension and when i run the code the error appears, i also tried using 7zip when extracting.
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Drivers\chromedriver_win32\chromedriver
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class SelTest {
public static void main(String [] args ) throws Exception {
System.setProperty("webdriver.chrome.driver","C:\\Drivers\\chromedriver_win32\\chromedriver");
WebDriver driver = new ChromeDriver();
driver.get("https://google.com");
driver.manage().window().maximize();
Thread.sleep(5000);
driver.close();
}
}
Solution
Please add .exe in the chromedriver path and then it would work.
Like:
System.setProperty("webdriver.chrome.driver","C:\\Drivers\\chromedriver_win32\\chromedriver.exe");
Answered By - Sameer Arora
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.