0

Error message

I set up a virtual environment and installed selenium, py.test and webdriverdownloader furthermore I set up a system environment variable and added path to geckodriver

But when I executed Python test in command line it fails with error:

geckodriver executable needs to be in path

What went wrong from my side?

A J
  • 3,970
  • 14
  • 38
  • 53
Z-CODE
  • 19
  • 3
  • 1
    See this: https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path – I_Al-thamary Dec 12 '18 at 06:05
  • 1
    Possible duplicate of [Selenium using Python - Geckodriver executable needs to be in PATH](https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path) – Sach Dec 12 '18 at 06:05

1 Answers1

1

This has nothing to do with your virtualenv, it's that Selenium requires an external driver to work. Geckodriver is for using with Firefox and you can download it from Mozilla's GitHub. Once you have downloaded it, just make sure that it is on your PATH. See this post if you don't know how to do that.

akrantz01
  • 628
  • 1
  • 9
  • 19
  • I downloaded Geckodriver and set it up in path. But this error is still there. – Z-CODE Dec 12 '18 at 06:40
  • Did you restart your shell? Also, you can check if it worked by running `echo %path%` for command prompt or `echo $Env:Path` for PowerShell. – akrantz01 Dec 13 '18 at 06:51