

Below is the code to set gecko driver using DesiredCapabilities class. Syntax: tProperty("","Path to geckdriver.exe file") Įxample: tProperty("","D:\\Downloads\\GeckoDriver.exe") ĭesired Capabilities help Selenium to understand the browser name, version and operating system to execute the automated tests. There are three different ways to initialize GeckoDriver.įirst, set the system property for Gecko Driver. Location will be used later to instantiate the driver. Note the location where you extracted the driver. Once the ZIP file download is complete, extract the contents of ZIP File onto a file folder The following are the list of steps to download gecko driver.Īt this page ,Select the appropriate version for GeckoDriver download based on your operating system Gecko Driver is available as an executable file that can be downloaded on the system. Hence, GeckoDriver is preferred compared to the earlier implementation of Firefox driver. The same Web Driver can be used for multiple browser versions.

This means Selenium Developers (People who code Selenium base) need not create a new version of Web Driver for each browser version. W3C is a universally defined standard for Web Driver. GeckoDriver uses W3C WebDriver protocol to communicate with Selenium. The major advantage of using GeckoDriver as opposed to the default Firefox driver is Compatibility. But the big question – what is the advantage? Hence testers are forced to use GeckoDriver if they want to run automated tests on Mozilla Firefox version 47.0+. The Firefox driver used in earlier versions of Mozilla Firefox will be discontinued, and only the GeckoDriver implementation would be used. Selenium Webdriver version 2.53 is not compatible with Mozilla Firefox version 47.0+. Firefox will understand the commands transmitted in the form of Marionette protocol and executes them. Selenium uses W3C Webdriver protocol to send requests to GeckoDriver, which translates them into a protocol named Marionette. After Selenium 3, testers need to initialize the script to use Firefox using GeckoDriver explicitly. In short, Gecko driver acts as a link between Selenium Web Driver tests and Mozilla Firefox browser.īefore Selenium 3, Mozilla Firefox browser was the default browser for Selenium. Gecko driver acts as a proxy between Web Driver enabled clients(Eclipse, Netbeans, etc.) and Mozilla Firefox browser. The term Gecko stands for a Web Browser engine that is inbuilt within Mozilla Firefox browser.
