python硒无法与Chrome驱动程序&镀铬版 [英] python selenium not running with chrome driver & chrome version

查看:81
本文介绍了python硒无法与Chrome驱动程序&镀铬版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用chrome驱动程序在硒中运行一个项目,但是一个月没有使用它(对chrome进行了更新). 当我运行该项目时,它会打开Chrome浏览器,然后立即关闭.

I am trying to run a project in selenium with chrome driver, but after I didn't use it for a month ( Was an update to chrome). When I run the project its opens thechrome browser and then immediately closes.

我收到以下错误:

回溯(最近通话最近): 文件"C:\ Users \ maorb \ OneDrive \ Desktop \ Maor \ python \ serethd \ tvil_arthur.py",第27行,在 驱动程序= webdriver.Chrome() init 中的文件"C:\ Program Files(x86)\ Python36-32 \ lib \ site-packages \ selenium \ webdriver \ chrome \ webdriver.py",第67行 wanted_capabilities = desired_capabilities) init 中的文件"C:\ Program Files(x86)\ Python36-32 \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py",第91行 self.start_session(所需功能,浏览器配置文件) 在start_session中的文件"C:\ Program Files(x86)\ Python36-32 \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py",第173行 'desiredCapabilities':desired_capabilities, 执行中的文件"C:\ Program Files(x86)\ Python36-32 \ lib \ site-packages \ selenium \ webdriver \ remote \ webdriver.py",行233 self.error_handler.check_response(响应) 文件"C:\ Program Files(x86)\ Python36-32 \ lib \ site-packages \ selenium \ webdriver \ remote \ errorhandler.py",行194,在check_response中 引发exception_class(消息,屏幕,堆栈跟踪) selenium.common.exceptions.WebDriverException:消息:会话未创建异常 从断开连接:无法接收来自渲染器的消息 (会议信息:chrome = 63.0.3239.108) (驱动程序信息:chromedriver = 2.36.540470(e522d04694c7ebea4ba8821272dbef4f9b818c91),platform = Windows NT 10.0.16299 x86_64)

Traceback (most recent call last): File "C:\Users\maorb\OneDrive\Desktop\Maor\python\serethd\tvil_arthur.py", line 27, in driver = webdriver.Chrome() File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 67, in init desired_capabilities=desired_capabilities) File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 91, in init self.start_session(desired_capabilities, browser_profile) File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 173, in start_session 'desiredCapabilities': desired_capabilities, File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 233, in execute self.error_handler.check_response(response) File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: session not created exception from disconnected: Unable to receive message from renderer (Session info: chrome=63.0.3239.108) (Driver info: chromedriver=2.36.540470 (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 10.0.16299 x86_64)

我正在使用chrome网络驱动程序版本2.36& Google Chrome版本63.0.3239.10

I am using chrome web driver version 2.36 & Google chrome version 63.0.3239.10

我尝试使用最新的Chrome& Chrome网络驱动程序版本,但是它打开了chrome,但是它只是打开了,并且没有执行任何代码.

I tried to use latest Chrome & Chrome webdriver version but Its opening the chrome but its just opening and not doing any of code.

推荐答案

通常,当您的脚本找不到chromedriver时,人们会收到此错误,可能是重新查看您指定的路径并添加可执行路径

Usually people get this error when your script cannot find the chromedriver maybe re look at where you specified the path to be and add a executable path

这篇关于python硒无法与Chrome驱动程序&镀铬版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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