运行python脚本报错:selenium.common.exceptions.SessionNotCreatedException: Message: session not created

原因:ChromeDriver版本与浏览器版本不匹配。

解决方法:重新下载适配的ChromeDriver。

ChromeDriver下载路径:https://registry.npmmirror.com/binary.html?path=chromedriver/

1.选择适配的版本进行下载

      2.找到python的安装路径

以win10为例:打开cmd--输入命令where Python--按下Enter键,可查看python安装路径

      3.将下载好的ChromeDriver的zip版本进行解压

      4.将解压后的 chromedriver.exe 放到 python的安装路径即可

运行python脚本报错:selenium.common.exceptions.SessionNotCreatedException: Message: session not created的更多相关文章

  1. appium常见问题03_appium脚本报错selenium.common.exceptions.WebDriverException

    运行appium脚本时报错selenium.common.exceptions.WebDriverException...,如下截图: 该报错说明appium和app的内置chrome版本不一致 [解 ...

  2. python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”

    安装了python2,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

  3. robotframework执行用例时,报错selenium.common.exceptions.WebDriverException: Message: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinl

    在用robotframework编写移动端测试用例(用chrome浏览器模拟手机浏览器),执行用例时, 报错selenium.common.exceptions.WebDriverException: ...

  4. selenium使用报错“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”

    安装了python3,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

  5. windows下使用selenium报错selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH

    问题 :执行程序代码报错: WebDriverException:Message:'geckodriver'executable needs to be in Path 或者 selenium.com ...

  6. Windows下运行python脚本报错“ImportError: No Module named ...”的解决方法

    之前遇到一个问题,在Pycharm或IPython之类的IDE上运行脚本正常,但是直接运行或cmd命令行运行的时候报了模块未能找到的错误--ImportError: No Module named . ...

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

    问题: 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器 下载地址:http://ftp.mozilla.org/pub/firefox/releas ...

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

    错误再现 原因:firefox浏览器版本和浏览器驱动版本不匹配 解决办法:卸载高版本浏览器,安装低版本浏览器

  9. selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. 错误处理方法

    首次使用selenium webdriver,webdriver.Firefox() 报错selenium.common.exceptions.WebDriverException: Message: ...

  10. 如何解决错误【selenium.common.exceptions.SessionNotCreatedException】

    如何解决错误[selenium.common.exceptions.SessionNotCreatedException]   [问题起因] 2018年12月26日晚,启动我的pycharm准备学习s ...

随机推荐

  1. 将excel按照某一列拆分成多个文件

    1.打开目标excel,按alt + f11键打开VBE窗口 2.选择插入->模块粘贴下面代码到编辑器中 Sub 保留表头拆分数据为若干新工作簿() Dim arr, d As Object, ...

  2. python正则表达式提取数据

    re模块, 常用写法 import re def abs_string(): s_string = ' @pytest.mark.Level1@pytest.mark.SmartSharedListd ...

  3. sprinboot多个子模块下 依赖包没有找到 解决方案

    最近因为在使用springboot开发项目,在开发过程中,发现自己的子模块导入通用的模块 在启动中 说找不到这个类 百度下 说我要在pom文件下 pulus 插件 那里 加上这段代码 <conf ...

  4. HDLbits——Lfsr5

    Build this LFSR. The reset should reset the LFSR to 1 module top_module( input clk, input reset, // ...

  5. .net基础—多线程(一)

    基本概念 进程 打开任务管理器,从任务管理器里面可以看到当前所有正在运行的进程.那么究竟什么是进程呢? 进程(Process)是操作系统中的一个基本概念,它包含着一个运行程序所需要的资源.一个正在运行 ...

  6. Android studio学习笔记1

    Android studio学习笔记1 20201303张奕博 2023.1.13 studio布局 1.线性布局 Android的线性布局不会换行,当组件一个挨着一个地排列到头之后,剩下的组件将不会 ...

  7. ORACLE备份脚本(4-RMAN1级增量备份)

    创建目录 mkdir  -p  /bak/level1 mkdir  -p  /bak/arch1 chown -R oracle:oinstall  /bak/ vi  rmanlevel1.sh ...

  8. Linux 看进程的线程数

    pstree -p 12345|wc -l 看进程的线程数 centos7默认并没有安装pstree,所以会有pstree:command not found 安装一下 yum install psm ...

  9. Pytest之参数化

    在unittest测试中,有参数化的概念,那么在pytest中也有. 如何理解参数化: 当对一个测试函数进行测试时,通常会给函数传递多组参数.比如测试账号登陆,我们需要模拟各种千奇百怪的账号密码.可以 ...

  10. 1.2 C语言--函数与数组

    函数 函数的定义 返回值类型函数名(类型形参名[,--]){ 函数体 } 除了没有访问修饰符外,基本等同于java的函数. 良好的程序设计风格要求即使没有返回值,也要使用return;作为最后一条语句 ...