相信很多第一次学习selenium的同学们也对这个异常不陌生了,但具体该如何解决这个bug呢?

主要的原因还是因为selenium模拟的客户端对浏览器的操作,但相应浏览器的驱动版本不匹配导致的。

为了解决这个问题,我们需要先了解我们当前浏览器的版本。以小菌用的谷歌浏览器为例。

打开浏览器,在地址栏输入chrome://version/便可以查看到谷歌当前的版本号

接着我们来到谷歌浏览器驱动的下载网址http://chromedriver.storage.googleapis.com/index.html

然后我们只需要根据操作系统,选择不同的zip下载即可!

下载完我们解压开,就是chromedriver.exe

还差最后一步,只需要把它放到下面两个路径下即可!

一个是在C盘的路径下,具体的位置:C:\Program Files (x86)\Google\Chrome\Application

还有一个就是在你python安装的目录下,

然后回到项目中,成功运行!!!

https://blog.csdn.net/weixin_44318830/article/details/103339273

selenium.common.exceptions.WebDriverException: Message: 'chromedriver'解决的更多相关文章

  1. 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P

    转载 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be i ...

  2. selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)

    1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...

  3. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  4. mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    from selenium import webdriver def test1(): url='http://www.baidu.com' driver=webdriver.Chrome(" ...

  5. centos7 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    1.查看安装的chrome浏览器版本 2.查看版本对应的驱动 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载后拷贝到 ...

  6. 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

    解决方案: 1.查看浏览器当前版本:chrome://version/. 2.到https://sites.google.com/a/chromium.org/chromedriver/downloa ...

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

    解决办法: 把chromedriver exe文件放到python scripts目录下

  8. python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下

  9. 解决selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path

    'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...

随机推荐

  1. (7)ASP.NET Core3.1 Ocelot Swagger

    1.前言 前端与后端的联系更多是通过API接口对接,API文档变成了前后端开发人员联系的纽带,开始变得越来越重要,而Swagger就是一款让你更好的书写规范API文档的框架.在Ocelot Swagg ...

  2. Vue.js自定义标签属性并获取属性,及绑定img的src属性的坑

    一.定义属性: 一般定义属性都是为了动态的去获取属性的值,或者动态的设置属性的值,如果想仅仅是设置一个普通的属性,直接在便签上设置属性即可,就像使用html的title.name等属性一样,如< ...

  3. deepin V20 简易入门指南

    deepin V20 入坑指南 系统安装 入坑第一步自然是先安装系统了,deepin的安装方式很简单只需要一个U盘即可,在官网下载好安装镜像文件,使用官方的启动盘制作工具,开机时选择从U盘启动即可,安 ...

  4. Spring Cloud注册中心之Zookeeper

    zookeeper可以作为分布式服务的注册中心 在服务端安装zookeeper 参考:https://www.cnblogs.com/conly/p/12267506.html 创建spring bo ...

  5. linux系统中 SElinux安全子系统

    1.SElinux 是什么? SElinux(Security-Enhanced Linux)是美国国家安全局在linux开源社区的帮助下开发的一个强制访问控制(Mandatory Access Co ...

  6. php include文件包含

    XCTF题目:Web_php_include <?php show_source(__FILE__);//高亮显示源文件 echo $_GET['hello']; $page=$_GET['pa ...

  7. 关于steam平台“wallpaper engine”软件出现界面黑屏,但壁纸能播放的问题

    前阵子重装电脑后,在使用wallpaper engine这款软件时发现了以下令人疑惑的画面: 点击"设置"和"壁纸选择"界面全是黑的......这还没完,更气人 ...

  8. 统计API调用次数

    使用redis的有序集合, Zincrby https://redis.io/commands/zincrby 使用的symfony框架的这个方法,会返回接口名称 $request->getPa ...

  9. 1、Go语言介绍

    一 Go语言介绍 Go 即Golang,是Google公司2009年11月正式对外公开的一门编程语言. Go是静态强类型语言,是区别于解析型语言的编译型语言. 解析型语言--源代码是先翻译为中间代码, ...

  10. 浅析Nginx与Apache的区别

    Nginx相对于Apache的优势: 1.轻量级,采用C进行编写,同样的web服务,会占用更少的内存及资源 2.抗并发,nginx以epoll and kqueue作为开发模型,处理请求是异步非阻塞的 ...