webdrivermanager icon indicating copy to clipboard operation
webdrivermanager copied to clipboard

web drive issue

Open Mnandhu88 opened this issue 8 years ago • 1 comments

public class drives {

public static void main(String[] args) throws InterruptedException  {
	System.setProperty("webdriver.Chrome.driver","‪E:\\chromedriver.exe");
	WebDriver driver = new ChromeDriver();
    driver.get("http://www.gcrit.com/build3/admin/");
    Thread.sleep(5000);
    driver.close();

i'm getting the while running

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html at com.google.common.base.Preconditions.checkState(Preconditions.java:847) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:125) 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 abcd.drives.main(drives.java:10)

Mnandhu88 avatar Sep 26 '18 08:09 Mnandhu88

Mnandhu88 - Using Eclipse , I have written this. For me works with this Code. Add External JAR's without fail. You may get. Try that.

import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class Example { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "D:\chromedriver_win32\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://google.com"); } }

sriranjani48 avatar Nov 21 '18 19:11 sriranjani48