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)。

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

相关推荐
一个天蝎座 白勺 程序猿12 小时前
Python爬虫(29)Python爬虫高阶:动态页面处理与云原生部署全链路实践(Selenium、Scrapy、K8s)
redis·爬虫·python·selenium·scrapy·云原生·k8s
代码的乐趣14 小时前
支持selenium的chrome driver更新到136.0.7103.94
chrome·python·selenium
深浅卡布星1 天前
Postman启动时检测到版本不匹配错误
测试工具·postman
九章云极AladdinEdu1 天前
GPU与NPU异构计算任务划分算法研究:基于强化学习的Transformer负载均衡实践
java·开发语言·人工智能·深度学习·测试工具·负载均衡·transformer
程序员小远1 天前
UI自动化测试方案详解
自动化测试·软件测试·selenium·测试工具·ui·职场和发展·测试用例
JZMSYYQ2 天前
磁光克尔效应在量子计算中的应用
功能测试·测试工具·制造
逸雨清风2 天前
Chrome更新到136以后selenium等自动化浏览器失效
selenium·自动化
小白学大数据2 天前
Python+Selenium爬虫:豆瓣登录反反爬策略解析
分布式·爬虫·python·selenium
小冯的编程学习之路3 天前
【软件测试】:推荐一些接口与自动化测试学习练习网站(API测试与自动化学习全攻略)
c++·selenium·测试工具·jmeter·自动化·测试用例·postman
Ten peaches3 天前
Selenium-Java版(操作元素)
java·selenium·测试工具·html