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


環境:Python3+selenium3+Firefox47

在打開火狐瀏覽器時報錯:'geckodriver' executable needs to be in PATH

from selenium import webdriver
web = webdriver.Firefox()

於是,各種度娘,最終做了如下嘗試:

  下載了geckodriver-v0.18.0-win64,解壓將geckodriver.exe放到火狐瀏覽器目錄下,然后把火狐瀏覽器目錄添加到path環境變量。

  結果又出現報錯:selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities

隨后,再次度娘,做了如下操作,成功:

  更新火狐瀏覽器到Firefox54

 

geckodriver.exe下載網址:https://github.com/mozilla/geckodriver/releases/


免責聲明!

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



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