Just a simple line of code, as shown above, would open the Firefox browser. Moreover, the WebDriver directly implements the FirefoxDriver, due to which there was no need to use any executable to launch Firefox.
#INSTALL GECKO DRIVER DRIVER#
To understand it more, refer below diagram:īefore Marionette became a part of Firefox, the default browser of WebDriver was Firefox, and it had its inbuilt driver to launch the Firefox browser. Additionally, this could be done directly by using the below line of code, and you could instantiate Firefox driver using the WebDriver reference like below: WebDriver driver = new FirefoxDriver() With earlier versions of Selenium (like version 2.53 & below ), launching the Firefox browser was straightforward. Now that we know the working of the firefox driver let us understand why we need it to execute our Selenium tests.
![install gecko driver install gecko driver](https://www.automationtestinghub.com/images/selenium/download-geckodriver-latest-version.png)
Hence, the execution happens inside the browser. The client or the local system sends a request, which is the WebDriver call to the GeckoDriver. The GeckoDriver converts these request( s) into Marionette Protocol and transfers to Marionette Driver. Now, the server sends back the response to the client via the GeckoDriver. Additionally, to understand more about how it interacts, refer to the diagram below: It works as a proxy between the local and remote end to translate calls into Marionette automation protocol.
![install gecko driver install gecko driver](https://res.cloudinary.com/damien1/w_400,c_scale,f_auto,q_auto,dpr_3.0/blog/selenium_logo.png)
Just like the other drivers( e.g., ChromeDriver), a local server is started by this executable, which runs your selenium tests.
![install gecko driver install gecko driver](https://i.ytimg.com/vi/21dK8q3BOZU/maxresdefault.jpg)
The WebDriver connects with the firefox browser using the GeckoDriver. Moreover, it is an executable file that the system paths for your test required. In simple words, GeckoDriver or Firefox driver links our Selenium tests with the Mozilla Firefox browser. Therefore, sometimes people often refer to it as Firefox driver when they mean it is the GeckoDriver. In other words, GeckoDriver is a proxy that interacts between W3C WebDriver-compatible clients and Gecko-based browsers like Firefox. GeckoDriver is the link between Selenium tests and the Firefox browser. Additionally, we can use it on Windows, macOS, Linux, Unix & BSD operating systems. The GeckoDriver is in C++ and JavaScript, as well in Rust since 2016. Different applications developed by Mozilla Foundation or Mozilla Corporation use it. Gecko is a web browser engine that has been developed by Mozilla. Let us first understand Gecko before understanding the GeckoDriver.
#INSTALL GECKO DRIVER HOW TO#
How to run tests in Headless mode using GeckoDriver?.Similarly, how to setup GeckoDriver on macOS?.Similarly, how to set it up on Windows?.