selenium&Firefox不兼容問題:Message: Unable to find a matching set of capabilitie;Can't load the profile. Profile;Message: 'geckodriver' executable needs to be in PATH


問題1:

selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilitie

問題2:

selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.

問題3:

Message: 'geckodriver' executable needs to be in PATH.

遇到這些問題,建議不用掙扎,檢查下selenium-lib的版本和Firefox的版本號.

問題1,2屬於Firefox過高,降級就行.Firefox歷史版本:http://ftp.mozilla.org/pub/firefox/releases/

問題3,需要下載 geckodriver,selenium 3.+ 以上容易遇到,因為selenium3和selenium2啟動機制不一樣造成的.

 


免責聲明!

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



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