Python 3.5 – “Geckodriver executable needs to be in PATH”

There are three ways to resolve this error.

  1. Download the gecko driver and keep it in directory where your python test script is there.
  2. Set the environment variable “webdriver.gecko.driver” with driver path as value. os.environ["webdriver.gecko.driver"]="c:\geckodriver.exe"

  3. Pass executable path to the constructor like driver = WebDriver.Firefox("path of executable")

Leave a Comment