selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.


http://www.seleniumhq.org/download

 

1. selenium 3.x開始,webdriver/firefox/webdriver.py的__init__中,executable_path="geckodriver";而2.x是executable_path="wires"
2. firefox 47以上版本,需要下載第三方driver,即geckodriver;在http://docs.seleniumhq.org/download/的Third Party Drivers, Bindings, and Plugins下面找到Mozilla GeckoDriver,下載到任意電腦任意目錄,解壓后將該路徑加入到PC的path(針對windows)即可。

作者:iceblue iceblue
鏈接:https://www.zhihu.com/question/49568096/answer/119324584
來源:知乎
著作權歸作者所有,轉載請聯系作者獲得授權。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM