My code is very simple
code:
WebDriver wd =new ChromeDriver();
System.setProperty("webdriver.chrome.driver",
"D:\List_of_Jar\chromedriver.exe");
String baseUrl = "https://www.google.com";wd.get(baseUrl);
have downloaded and added jar as "Java-3.4.0" from selenium hq site.
Download Google Chrome Driver-2.29 from the same website and located it in "D:List_of_Jar" path.
When I run the above code I getting an error as
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:738)
Getting version error though did proper configuration. so kindly help me for fixing the issue.
Details:
- OS: Windows XP.
- Java : JDK1.8 and JRE1.8.
- Selenium : version 3.4
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…