lundi 1 octobre 2018

Java Eclipse - Expect browser binary location

I am trying to run the following Java Code:

package tests;

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

public class sekcija9 {

    public static void main(String[] args) {        
        System.setProperty("webdriver.gecko.driver","C:\\Program Files\\Mozilla Firefox\\geckodriver.exe");

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

I am getting the following error:

Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

I am using:

  1. Firefox 62.0.2 64bit

  2. Selenium 3.3.1

  3. GeckoDriver 0.22.0 (latest)

I have looked here: link

Do I need to downgrade Firefox version? If not, how can I resolve this issue without downgrade?

Aucun commentaire:

Enregistrer un commentaire