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: Message: 'geckodriver' executable needs to be in PATH.

原文地址:https://www.cnblogs.com/Wei-s/p/8968827.html

时间: 2024-10-13 05:26:35

selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.的相关文章

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

【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: 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错误: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】初次用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: 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

selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary

jenkins集成web_UI自动化脚本,发送的html报告中显示: selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary 如下图: 使用Chrome浏览器时,经常会遇到以下报错:浏览器没有调用起来 通常由两种问题引起的: 1.ChromeDriver.exe驱动有问题(包括版本,路径等等) 2.Chrome.exe本身有问题. 网上搜索的解决方案:三个 1

WebDriverException:Message:'geckodriver'executable needs to be in Path

geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe,下载地址:https://github.com/mozilla/geckodriver/releases 解决办法: 1.解压: 2.将可执行文件放在可执行文件路径PATH里面: WebDriverException:Message:'geckodriver'executable needs to be in Path 原文