Java-версия - 1.8
Eclipse-версия - 2018-09 (4.9.0)
Selenium - 3.141
Расширяемый файл Firefox - v0.23.0
Мой код:
package testcases;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TestBrowsers {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver", "C:\\Users\\adiwakar\\Documents\\Selenium Browser files");
FirefoxDriver driver = new FirefoxDriver();
driver.get("https://www.google.com/");
}
}
Ошибки:
Exception in thread "main" java.lang.IllegalStateException: The driver executable is a directory: C:\Users\adiwakar\Documents\Selenium Browser files
at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:148)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141)
at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:44)
at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:167)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:147)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at testcases.TestBrowsers.main(TestBrowsers.java:10)