python3.6启动火狐浏览器报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”

安装python3.6,火狐最新版本61.0.1下,在启动火狐浏览器时,报“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”

网上查的解决方法,亲试有效:

  geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe

(1)下载geckodriver.exehttps://github.com/mozilla/geckodriver/releases

(2)下载对应版本压缩包

(3)解压,将解压文件放在python安装目录下(C:pythonpython36)

(4)查看环境变量path中是否添加C:Pythonpython36该路径

再次运行脚本,成功启动火狐浏览器

原文地址:https://www.cnblogs.com/huwang-sun/p/9347406.html