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/