python-3.x - Selenium 超时从 python 上的渲染器接收消息
问题描述
在 Chrome 发布他们最新的稳定版本 (89.0.4389.90) 之后,我现在收到这个错误:
selenium.common.exceptions.TimeoutException:消息:超时:从渲染器接收消息超时:291.642(会话信息:无头 chrome=89.0.4389.90)
我的 Python 代码是
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.headless = True
options.add_argument('--no-sandbox')
options.add_argument('--disable-gpu') # maybe needed if running on Windows.
options.add_argument("--disable-dev-shm-usage")
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome('/usr/local/bin/chromedriver', options=options)
urls = "https://www.google.com/"
driver.get(urls) #here I have the error
(我的 chromedriver 是 89.0.4389.23 是 unic)
有人可以帮我解决这个问题吗?
解决方案
我会参考上一篇文章,您可能会在其中找到一些有用的解决方法:Chrome Webdriver 在 Selenium 中产生超时
推荐阅读
- firebase - Flutter Firebase 包... Streambuilder“snapshot.data.documents”错误
- php - PHP中的Django密码解密(使用盐和密码)
- javascript - 如何从嵌套对象中获取所有键
- notifications - android,它可以在不保存用于构建该通知的构建器的情况下更新活动通知吗
- javascript - 如何在没有 npm 的情况下以纯 HTML 托管两个或多个 JSX 文件?
- php - laravel 聊天加载更多分页
- c++ - 对向量对中的向量进行排序
- javascript - 我可以通过执行嵌套函数来停止函数吗?
- javascript - Eclipse-03 中的 Javascript 编辑 - 设置默认编辑器
- c# - EF核心唯一约束违反,循环依赖