问题描述
当我使用 chrome 驱动时,显示驱动服务器启动超时.当我尝试使用 Firefox 时,它显示会话意外退出.我正在尝试在 python 中使用 selenium 在服务器上运行远程驱动程序我该怎么办?无法创建新会话.
It is showing timed out for driver server to start when I use chrome driver. And when I try to use Firefox it is showing session unexpectedly exited. I am trying to run the Remote driver on a server using selenium in python what should I do? Unable to create new session.
UnknownError:等待驱动程序服务器启动超时.构建信息:版本:'3.141.0',修订:'2ecb7d9a',时间:'2018-10-31T20:22:52'系统信息:主机:'server.*******.com',ip:'61.16.155.6',os.name:'Linux',os.arch:'amd64',os.version:'3.10.0-862.11.6.el7.x86_64',java.version:'1.8.0_201'驱动信息:driver.version:未知
UnknownError: Timed out waiting for driver server to start. Build info: version: '3.141.0', revision: '2ecb7d9a', time: '2018-10-31T20:22:52' System info: host: 'server.*******.com', ip: '61.16.155.6', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.11.6.el7.x86_64', java.version: '1.8.0_201' Driver info: driver.version: unknown
推荐答案
这个错误信息...
Driver info: driver.version: unknown
...暗示 ChromeDriver 没有被 Browsing Context 识别,即 Chrome 浏览器.
...implies that the ChromeDriver wasn't recognized back by the Browsing Context i.e. Chrome browser.
确保:
- JDK 升级到当前级别 JDK 8u222.
- Selenium 已升级到当前级别版本 3.141.59.
- ChromeDriver 已更新为当前 ChromeDriver v78.0 级别.
- Chrome 已更新至当前 Chrome 版本 78.0 级别.(根据 ChromeDriver v78.0 发行说明)
- 清理你的项目工作区通过你的IDE和重建你的项目只需要依赖.
- JDK is upgraded to current levels JDK 8u222.
- Selenium is upgraded to current levels Version 3.141.59.
- ChromeDriver is updated to current ChromeDriver v78.0 level.
- Chrome is updated to current Chrome Version 78.0 level. (as per ChromeDriver v78.0 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
您可以在以下位置找到有关版本兼容性的详细讨论:
You can find a detailed discussion on version compatibility in:
- 如何在 Chrome 浏览器通过 Python selenium 自动更新时使用特定版本的 ChromeDriver
这篇关于驱动程序信息:driver.version:ChromeDriver Chrome 使用 Selenium 和 Python 时未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!