Search code examples
python-3.xseleniumgeckodriver

How can I fix this geckodriver error in Python?


I started learning selenium, and when I ran this code...

   from selenium import webdriver
   browser = webdriver.Firefox()
   print(type(browser))

When I ran that code, I got this error - Message: 'geckodriver' executable needs to be in PATH.

How can I fix this error? I'm working on Firefox 64bit, and my Selenium Version is '3.141.0'.


Solution

  • The error is fixed, I just put the geckodriver.exe into the Python39 folder and it works now perfectly!