selenium运行时出现错误信息:Message: ‘geckodriver‘ executable needs to be in PATH 的解决办法

Windows 环境,Selenium 基于Python,运行时出错:
解决方法1:selenium3已发布,firefox需要驱动。因此报错selenium2不需要,装回selenium2就可以了。

解决方法2:

1:、https://github.com/mozilla/geckodriver/releases 下面找到Mozilla GeckoDriver下载解压后将geckodriver.exe放到C:\Program Files\Mozilla Firefox(安装firefox的路径)

2、将C:\Program Files\Mozilla Firefox添加入环境变量,注意修改的时候要小心,不要将已有的环境变量删掉了

3、重启pycharm

你可能感兴趣的:(python_selenium)