top of page
Search
  • Seema Nair

GeckoDriver - Marionette


FirefoxDriver() will cease to function on the newer versions of Firefox i.e. version 47 and above. The newer versions will require a new driver called Marionette.

Mozilla Firefox runs on Gecko browser engine. Just like other popular browsers - Chrome, Internet Explorer and Microsoft Edge, Mozilla foundation has decided to introduce Marionette driver to control Firefox browser. Gecko Driver is the link between your tests in Selenium and the Firefox browser.

Steps to run your scripts on the latest Firefox browser:

1. Download the latest geckodriver from here: https://github.com/mozilla/geckodriver/releases.

2. Download the latest firefox browser on your machine.

3. In your selenium script, set the path of the geckodriver exe file for the property "webdriver.firefox.marionette" as shown below

import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.*;

public class geckoExample {

private WebDriver driver;

public static void main(String[] args) {

System.setProperty("webdriver.firefox.marionette", "test\\resources\\geckodriver.exe");

//If you are using Mac, use

System.setProperty("webdriver.firefox.marionette", "test/resources/geckodriver");

WebDriver driver = new FirefoxDriver();

driver.get("www.test.com);

WebElement user = driver.findElement(By.id("username"));

user.sendKeys("firstName");

}


162 views0 comments
bottom of page