Ubuntu: How do I use the gecko executable with selenium


I use Ubuntu studio 16.10, and I have set up Selenium 3.0.1. I have then installed geckodriver, and used the following

    WebDriver driver = new FirefoxDriver();        System.setProperty("webdriver.gecko.driver", "/home/myacc/eclipse/jee-neon2/eclipse/geckodriver");        driver.get("www.google.co.in");  

However I still get the following error:

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)  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »