1

I'm using Selenium 3 on Ubuntu and I am not able to launch the Firefox browser itself. I am getting following error-

error:

"driver is not executable"...

Here is the script:

package pom;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class Demo2
{   
    public static void main(String args[])
    {
        System.setProperty(
          "webdriver.gecko.driver",
          "/home/chetan/workspace/Test_Project/driverfiles/geckodriver");

        WebDriver driver = new FirefoxDriver();
        driver.get("https://www.google.com");

     }
}

2 Answers 2

1

Make sure that you have the capabilities set before running your script. There is a version compatibility issue going around.

Be clear on what you want. I know it would be difficult to adjust with stack community but make sure you learn quicker.

System.setProperty("webdriver.gecko.driver","/path/to/your/geckodriver);
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver driver = new FirefoxDriver(capabilities);
driver.get("your link");
1
  • quicker than what? ;) Commented Jul 12, 2017 at 12:03
0

On a Linux OS files need to be marked as executable, probably you downloaded driver manually and didn't set the executable flag, try the following command:

chmod +x driverFilename

For GUI methods look at this page for alternatives.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.