How do I install Geckodriver? How do I install Geckodriver? selenium selenium

How do I install Geckodriver?


  1. You can download the geckodriver
  2. unzip it
  3. Copy that .exe file and put your into python parent folder (e.g., C:\Python34)
  4. write your scripts.

It will execute successfully.


There is an easy way to install Geckodriver:

  1. Install webdrivermanager with pip

    pip install webdrivermanager

  2. Install the driver for Firefox and Chrome

    webdrivermanager firefox chrome --linkpath /usr/local/bin

  3. Or install the driver only for Firefox

    webdrivermanager firefox --linkpath /usr/local/bin

  4. Or install the driver only for Chrome

    webdrivermanager chrome --linkpath /usr/local/bin


The easiest way if you are on windows:

driver = webdriver.Firefox(executable_path=r'[Your path]\geckodriver.exe')

Example:

driver = webdriver.Firefox(executable_path=r'D:\geckodriver.exe')