Selenim 3.0 + FireFox 啟動報錯:'geckodriver' executabl needs to be in PATH


 

driver=webdriver.Firefox()

運行報錯:

Exception AttributeError: "'Service' object has no attribute 'process'" in <boun
d method Service.__del__ of <selenium.webdriver.firefox.service.Service object a
t 0x028940B0>> ignored

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

 

 

 

Path: https://github.com/mozilla/geckodriver/releases

下載后,將geckodriver.exe復制到C:\Program Files (x86)\mozilla firefox目錄下;

並在環境變量Path中添加路徑:C:\Program Files (x86)\mozilla firefox;

重啟cmd,再次運行即可;

 


免責聲明!

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



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