Gecko (Marionette) Driver in Selenium 3
What will you learn in this session.
- Selenium Interview Questions
- What is GeckoDriver?
- How to use GeckoDriver to launch Firefox
- Sample automation code to use GeckoDriver?
What is GeckoDriver?
Well, before telling what is GeckoDriver. Let me explain what is Gecko.
Gecko is a web browser engine used in many applications developed by Mozilla Foundation and the Mozilla Corporation.
Gecko Driver is the link between your tests in Selenium and the Firefox browser.
GeckoDriver is a proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers e.g. Firefox
Gecko Driver is an executable file that you need to have in one of the system path before starting your tests.
Firefox browser implements the WebDriver protocol using an executable called GeckoDriver.exe.
In version, Selenium 3 , geckodriver is needed.
How to use GeckoDriver to launch Firefox?
You need to download GeckoDriver and then set its path.
After download from github, you’ll get geckodriver.exe.
Using below 2 ways, you can use GeckoDriver and launch Firefox browser.
1. Using System.setProperty
2. By Setting Desired Capabilities of the Marionette/Gecko Driver
I have made a video tutorial for gecko driver. Please watch it.