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");

     }
}
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");
| improve this answer | |
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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