SessionNotCreatedException:消息:未创建会话:此版本的ChromeDriver仅支持带有Selenium ChromeDriver的Chrome版本76 [英] SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 76 with Selenium ChromeDriver

查看:125
本文介绍了SessionNotCreatedException:消息:未创建会话:此版本的ChromeDriver仅支持带有Selenium ChromeDriver的Chrome版本76的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在使用Chrome 75,并且已经下载了适用于Linux的兼容Chromedriver .我也将其添加到PATH变量中.但是,当我尝试使用driver = webdriver.Chrome()初始化驱动程序时,出现以下错误:

I am currently using Chrome 75 and I've downloaded the compatible Chromedriver for linux. I've also added it to the PATH variable. However, when I attempt initializing a driver with driver = webdriver.Chrome() I get the following error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 76

我从此消息中得到的信息是我的Chromedriver适用于Chrome 76版,但我的Chromedriver和Chrome浏览器均为75版.

What I get from this message is that my Chromedriver is ment for Chrome version 76, but both my Chromedriver and Chrome browser are version 75.

我什至尝试从文件中完全删除Chromedriver,但仍然收到相同的错误消息

I even tried deleting the Chromedriver completely from my files and I still get the same error message

推荐答案

此错误消息...

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 76

...表示 ChromeDriver 无法启动/产生新的 WebBrowser ,即 Chrome浏览器会话.

...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

您的代码试用和错误堆栈跟踪将帮助我们以更好的方式调试问题.尽管您提到了与Linux兼容的Chromedriver ,但是您的程序在执行时选择了 ChromeDriver v76.0 .

Your code trials and the error stack trace would have helped us to debug the issue in a better way. Though you mentioned about compatible Chromedriver for linux but your program while in execution picks up the ChromeDriver v76.0.

您的主要问题是所使用的二进制文件版本之间的不兼容性:

Your main issue is the incompatibility between the version of the binaries you are using as follows:

支持 Chrome 76版


解决方案

确保您拥有:


Solution

Ensure you have:

  • 从系统中删除所有现有的 Chromedriver 不同版本.
  • ChromeDriver 已更新为当前的 ChromeDriver v76.0 级别.
  • Deleted all the existing different versions of Chromedriver from your system.
  • ChromeDriver is updated to current ChromeDriver v76.0 level.

此外,请确保您获取了 ChromeDriver v76.0 的最新版本,即

Additionally, ensure you pick up the latest release of ChromeDriver v76.0 i.e. ChromeDriver v76.0.3809.126.

  • Chrome 已更新为当前的 Chrome版本76.0 级别. (根据 ChromeDriver v76.0发行说明)
  • 通过 IDE
  • 清理您的项目工作区重建您的项目,并且仅具有必需的依赖项.
  • 如果您的基本 Web客户端版本太旧,请通过来卸载. Revo Uninstaller 并安装最新版本的 Web客户端 GA和发行版.
  • 进行系统重启.
  • 非root用户用户的身份执行@Test.
  • 始终在tearDown(){}方法中调用driver.quit()以关闭&优雅地销毁 WebDriver Web Client 实例.
    • Chrome is updated to current Chrome Version 76.0 level. (as per ChromeDriver v76.0 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Take a System Reboot.
    • Execute your @Test as non-root user.
    • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
    • 您可以在以下位置找到相关的详细讨论:

      You can find a relevant detailed discussion in:

相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆