Я получаю указанную ниже ошибку при попытке выполнить сценарий в InternetExplorer с помощью InternetExplorerDriver (WebDriver).
Мой код ниже
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
public class OpenBrowser {
public static void main(String[] args){
System.setProperty("WebDriver.ie.driver","C:\\Users\\cad0376\\Desktop\\SeleniumWork\\IEDriverServer_x64_3.9.0");
WebDriver driver = new InternetExplorerDriver();
driver.get("https://google.com/");
}
}
Сообщение об ошибке консоли
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.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.ie.InternetExplorerDriverService.access$000(InternetExplorerDriverService.java:35)
at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.findDefaultExecutable(InternetExplorerDriverService.java:188)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:346)
at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:281)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:211)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:150)
at OpenBrowser.main(OpenBrowser.java:10)
Process finished with exit code 1