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

时间: 2024-08-27 09:42:50

selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities的相关文章

“selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities“解决办法

问题: 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 下载地址:http://ftp.mozilla.org/pub/firefox/releases/ 比如http://ftp.mozilla.org/pub/firefox/releases/58.0/win64/zh-CN/ 58.0指版本,win64指64位,zh-CN指简体中文 目前我能成功的环境为: 驱动:geckodriver-v0.24.0-win64.zip   浏览器:v5

错误:selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

错误再现 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 原文地址:https://www.cnblogs.com/HByang/p/12272878.html

Selenium错误:selenium.common.exceptions.WebDriverException: Message: "Can't load the profile.

错误描述:在python代码中通过selenium来初始化一个firefox浏览器失败,看了下selenium的版本是2.35,然后用firefox --version看了下是28.0,firefox好像不听话自动升级了导致了旧版selenium不支持. Traceback (most recent call last): File "C:\Python27\erSiteCompare.py", line 528, in sys.exit(main()) File "C:\P

python selenium模块使用出错-selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

Python 2.7+selenium+Firefox 55.0.3 代码: from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys import time browser = webdriver.Firefox() # Get local session of firef

【Python + Selenium】初次用IE浏览器之报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

初次用IE浏览器运行自动化程序时,报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled

selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

报这个错查了一下解决方法: 1.使用pip安装selenium,默认安装最新版本,需要到官网上下载与系统相应的最新版本geckodriver:https://github.com/mozilla/geckodriver/releases 2.解压之后把EXE程序放到Python的安装目录下,如果是放在其它目录下需要自己再配一下环境变量,重启IDE 3.如果还没有解决,就把Firefox升级到最新版本 selenium.common.exceptions.WebDriverException: M

【bugRecord2】selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

环境信息:Windows7 64位 + python 3.6.5 + selenium 3.11.0 +pyCharm 1 #coding=utf-8 2 from selenium import webdriver 3 driver=webdriver.Firefox() 解决方法: 1.下载geckodriver,路径:https://github.com/mozilla/geckodriver/releases 2.解压后无需安装,将其解压路径配置到环境变量PATH [bugRecord2

关于Selenium.common.exceptions.WebDriverException: Message: Invalid locator strategy: css selector 的问题

在执行脚本时报Selenium.common.exceptions.WebDriverException: Message: Invalid locator strategy: css selector 的错 出现这个问题时请先检查你的selenium版本是否和Appium-Python-Client 的版本互相兼容 如果你的selenium是3.4的版本,需要下载 Appium-Python-Client 2.8的版本 如果selenium是2.53.6的请一定要下载 Appium-Pytho

初学selenium-grid执行脚本报错:selenium.common.exceptions.WebDriverException: Message: Error forwarding the new session Empty pool of VM for setup Capabilities {browserName: firefox, javascriptEnabled: true, v

初衷是想实现一个Remote实例,也是刚学selenum-grid,就迫不及待写个脚本运行看看效果: 显示报错:selenium.common.exceptions.WebDriverException: Message: Error forwarding the new session Empty pool of VM for setup Capabilities {browserName: firefox, javascriptEnabled: true, version: } 原因是启动S