我在 Ubuntu 16.04 上安装了 python3-selenium apt 包。安装时,收到一条消息:
Suggested packages:
chromedriver firefoxdriver
The following NEW packages will be installed:
python3-selenium
当我尝试在 python3-django 中运行测试用例时,出现以下错误:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/firefoxdriver/webdriver.xpi'
我确实在 Ubuntu 存储库中搜索了名为 firefoxdriver 的软件包,但不存在。
感谢任何有关安装网络驱动程序的帮助。
最佳答案
我不确定在安装 python3-selenium
包后如何安装 Firefox webdriver。
您可以改用 pip 安装,最好是在虚拟环境中。
如果您安装了 Firefox 并且在虚拟环境中运行了 pip install selenium
,那么您应该可以开始了。
关于python - 如何在 ubuntu 上为 python3 selenium 安装 firefoxdriver webdriver?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37148860/