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

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

相关推荐
小白学大数据8 小时前
构建企业级Selenium爬虫:基于隧道代理的IP管理架构
爬虫·tcp/ip·selenium
华科云商xiao徐10 小时前
详解Selenium爬虫部署七大常见错误及修复方案
爬虫·selenium
别来无恙14913 小时前
使用Python和Selenium进行Web自动化测试:从入门到实践
selenium·测试工具
Python大数据分析@13 小时前
python用selenium怎么规避检测?
开发语言·python·selenium·网络爬虫
ThreeAu.13 小时前
Miniconda3搭建Selenium的python虚拟环境全攻略
开发语言·python·selenium·minicoda·python环境配置
测试老哥1 天前
6个步骤实现Postman接口压力测试
自动化测试·软件测试·测试工具·测试用例·接口测试·压力测试·postman
北岛三生2 天前
ISP(图像信号处理器)
图像处理·数码相机·测试工具·计算机视觉·测试用例·模块测试
北岛三生2 天前
Camera tuning flow相机调试流程
图像处理·数码相机·测试工具·模块测试