Я использую студию Ubuntu 16.10, и я настроил Селен 3.0.1. Я затем установил geckodriver и использовал следующее
WebDriver driver = new FirefoxDriver();
System.setProperty("webdriver.gecko.driver", "/home/myacc/eclipse/jee-neon2/eclipse/geckodriver");
driver.get("www.google.co.in");
Однако я все еще получаю следующую ошибку:
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
Инициализируйте экземпляр драйвера после установки системного свойства.
System.setProperty("webdriver.gecko.driver", "/home/myacc/eclipse/jee-
neon2/eclipse/geckodriver");