WebDriverException:Message:'geckodriver'executable needs to be in Path

1.查看C:\Python27\Lib\site-packages\selenium\webdriver\firefox中的webdriver.py,在def_init_函数中,executable_path="geckodriver",之前搭建的环境上是executable_path="wires";
2.geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe,下载地址:https://github.com/mozilla/geckodriver/releases
3.放在C:\Python27(查看环境变量path中是否添加C:\Python27该路径)

你可能感兴趣的:(selenium)