問題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啟動機制不一樣造成的.