Testing Problem please anyone can tell me why its showing error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Testing Problem please anyone can tell me why its showing error

package sanityTests; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; //import org.openqa.selenium.firefox.FirefoxDriver; public class AdminLogin { public static void main(String[] args) { WebDriver driver = new ChromeDriver(); //driver.close(); } } Output:- run: 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:124) at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32) at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:339) at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123) at sanityTests.AdminLogin.main(AdminLogin.java:12) Java Result: 1 BUILD SUCCESSFUL (total time: 1 second)

26th Apr 2018, 9:09 PM
Susovan Das
Susovan Das - avatar
1 Answer