python - 使用 python 和 selenium 打开链接时出错
问题描述
尝试使用 python 和 selenium 在浏览器中打开谷歌,给了我以下错误:(错误图片)
DevTools 监听 ws://127.0.0.1:57033/devtools/browser/45f6818b-0d1e-4b81-9 637-861b579c7470 [0901/085753.496:ERROR:gl_surface_egl.cc(863)] eglInitialize D3D9 失败,出现错误 EGL_01IALED_IT0 /085753.496:ERROR:gl_initializer_win.cc(232)] GLSurfaceEGL::InitializeOneOf f 失败。[0901/085753.502:ERROR:viz_main_impl.cc(201)] 由于初始化期间出现错误而退出 GPU 进程 [7188:10216:0901/085753.819:ERROR:gpu_process_transport_factory.cc(1016)] 丢失 UI 共享上下文。[0901/085753.912:ERROR:command_buffer_proxy_impl.cc(113)] ContextResult::kFatalF ailure: 共享内存句柄无效 [0901/085753.962:ERROR:command_buffer_proxy_impl.cc(113)] ContextResult::kFatalF ailure: 共享内存句柄是无效
它启动 chrome 浏览器,也打开链接,但它在后面给出错误...
print("Starting...")
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
print("Opening...")
driver = webdriver.Chrome()
driver.get('https://google.com')
解决方案
推荐阅读
- vb.net - 从组合文本文件中删除重复项
- ios - 顶部栏显示过渡到根视图控制器 Swift
- android - 独立设备上的 Halide::Runtime::buffer 错误
- angular - 从指向 Angular 应用程序内的 wordpress 站点的 URL 中删除子目录名称
- java - 多用户 Reactjs 应用程序需要 redux 吗?
- javascript - 如何在 IE11 中为 HTML 表格实现粘性标题?
- c# - 如何从字符串中获取int的名称
- zone - 使用 Google Cloud AI Platform - 错误消息“区域没有足够的资源来满足请求”
- java - 通过 WSDL 策略声明生成 WSS 代码
- wcf - 无法在 BizTalk 2016 中配置 WCF-SQL 适配器