How To Use Marionette Driver In Selenium 3 – Marionette GeckoDriver

Executing Selenium WebDriver Script in Firefox Browser using Marionette GeckoDriver :

Marionette Geckodriver – Launching Firefox Browser In Selenium 3:

What is Marionette Driver:

Marionette Driver (a.k.a GeckoDriver). The Marionette is an automation driver for Mozilla’s Gecko engine. It is the next generation of FirefoxDriver.

Here in this post, we see how to run Selenium WebDriver Script in Firefox Browser using Marionette GeckoDriver. Moving forward, we need to have geckodriver.exe and Selenium WebDriver.

Please be patient. The video will load in some time.

Assuming that you have already Installed Selenium WebDriver.

If you want to install Selenium WebDriver, click on the link below to install Selenium WebDriver in few clicks.

How To Download And Install Selenium WebDriver

Each and every browser has its own Driver to execute Selenium WebDriver Scripts. Selenium WebDriver supports browsers such as Mozilla Firefox, Google Chrome, Internet Explorer, Opera, Safari etc.,

Here we are going to see how to run Selenium WebDriver Script in Firefox Browser using Marionette Gecko Driver.

Why Marionette Geckodriver?

Selenium has launched Selenium 3 and if you are using Firefox latest version then you may face some issues.

To launch latest version of Firefox Browser using Selnium 3, we need to set a system property “webdriver.gecko.driver” to the path of executable file “geckodriver.exe”

Also find,

How to Run Selenium Webdriver Script in Firefox browser – Old Version
How to Run Selenium Webdriver Script in Internet Explorer
How to Run Selenium WebDriver Script in Chrome Browser

Step 1: Download GeckoDriver.exe

Click here to download Marionette Gecko driver

Download the latest release of Gecko driver and unzip the downloaded compressed file and keep it somewhere on a known location on your system.

Step 2: Executing the Test Script in Firefox Browser

Find the sample script (using Java) mentioned below to run test script in Firefox browser using Marionette Geckodriver. Execute it to run the test in Firefox browser which will first open Firefox browser and then open the appropriate URL mentioned in the script

SCRIPT:

Issue 1:

If you use old version of mozilla firefox (eg. firefox 45) and latest version of Selenium (Selenium 3.0.1) then you face the below mentioned error.

Exception in thread “main” java.lang.IllegalStateException

Issue 2:

If you use latest version of Mozilla Firefox (eg. Firefox 49) and old version of Selenium (Selenium 2.53) then you face the below mentioned error.

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.

To overcome these issues, you need to download Gecko Driver as shown above.

If you are not regular reader of my blog then I highly recommend you to signup for the free email newsletter using the below link.

Subscribe and get a free eBook and regular updates from SoftwareTestingMaterial.com

Get our latest blog posts delivered to your inbox

Subscribe and get popular blog posts about software testing industry.

Rajkumar

Leave a Comment

Share via
Copy link
Powered by Social Snap