selenium 4.20.0 访问外网问题

  1. 保存信息:There was an error managing chromedriver (error sending request for url (https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.91/win64/chromedriver-win64.zip)); using driver found in the cache

  2. 报错原因 :因为selenium4.20.0有自带的浏览器驱动管理 。当它去下载这个google浏览器驱动时出现了url请求错误。

  3. 解决方法 :我们直接使用报错的地址 自己去下载这个驱动 ,然后自己再将这个驱动存放地址配置到代码中去就不会报错了。

    python 复制代码
    from selenium import webdriver
    from selenium.webdriver.chrome.service import Service
    from selenium.webdriver.common.by import By
    
    driver = webdriver.Chrome(service=Service(executable_path=r"E:\chromedriver-win64\chromedriver.exe"))
    driver.get("https://www.baidu.com")
    element = driver.find_element(By.ID, "kw")
    element.send_keys("百度搜索")
  4. 问题严重程度:其实这个没有什么影响google浏览器还是能照常运行。应为它使用在缓存中找到的驱动对google浏览器进行了操作(using driver found in the cache)。

    自己的拙见,有不足地方欢迎大家帮忙指出问题

相关推荐
弹简特24 分钟前
【精通Postman接口测试】03-结果断言实战 + 数据驱动保姆级教程
测试工具·接口测试·postman·断言
测试员周周4 小时前
【免费福利】AI测试:测试技能包进阶:造数、压测、视觉回归、CI 全流程串联
开发语言·人工智能·python·功能测试·测试工具·ci/cd·测试用例
PhotonixBay7 小时前
表面粗糙度怎么测才准?ISO 25178标准三维面积测量标准解析
人工智能·测试工具
KK溜了溜了8 小时前
wireshark and tcpdump抓包
测试工具·wireshark·tcpdump
老神在在0011 天前
JSON Schema
测试工具·json
小杍随笔1 天前
【FlyEnv v4.15.0 重磅更新!新增 FrankenPHP、CliProxyAPI、Numa、Rnacos 模块,开发效率再升级】
测试工具·开发环境管理工具
软件测试慧姐1 天前
软件测试常见面试题汇总(2026版)
软件测试·测试工具·面试
weixin_419658312 天前
基于 Trae 和 Postman-MCP-Server 接口自动化测试
测试工具·postman
weixin_419658313 天前
Postman-MCP-Server 的构建以及在 Trae 中的配置方法
测试工具·postman
测试员周周3 天前
【AI测试系统】第6篇:需求扔进去,3 分钟出测试用例?AI测试系统的 RAG 知识增强实战
人工智能·python·功能测试·测试工具·测试用例