简体   繁体   中英

How to execute Python test in virtual environment

错误信息

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM