How do I download Gecko driver for Selenium?

How do I download Gecko driver for Selenium?

To download Gecko driver for Selenium:-

Step 1: You can download Selenium FirefoxDriver or Selenium GeckoDriver from the official GitHub repository of Mozilla. Open the link and scroll towards the bottom of the page. Open the Assets menu and download the Selenium FirefoxDriver respective to your operating system.

Step 2: Extract the downloaded file. Step 3: Copy the GeckoDriver (geckodriver.exe) to the folder where the Firefox browser is located. By doing so, you can avoid giving the absolute path of the Selenium GeckoDriver if the Selenium FirefoxDriver instance is created in the test code.