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

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

相关推荐
念越1 小时前
自动化测试入门指南:Selenium环境搭建+第一个实战案例
自动化测试·selenium·测试工具·蓝桥杯
站长工具箱1 小时前
鼠标在线测试工具:全维度检测鼠标性能,本地处理更安全
测试工具·计算机外设
老师好,我是刘同学1 小时前
Verdi波形调试全功能详解
测试工具
小邓睡不饱耶1 小时前
实战教程:基于Selenium+BeautifulSoup爬取易车网新能源汽车销量数据
selenium·测试工具·beautifulsoup
sheepfagdng1 小时前
Python-web自动化-selenium(2)
运维·selenium·自动化
虚幻如影5 小时前
Selenium 自动化测试中 Chrome 浏览器弹出“您的连接不是私密连接”
chrome·selenium·测试工具
sheepfagdng15 小时前
python-web自动化-selenium(1)
selenium·测试工具
武汉禹力自动化科技1 天前
Carlo Gavazzi Dupline 测试工具 GTU8 深度解析:现场总线调试与诊断的核心利器
测试工具·佳乐现场总线·gtu8
qq_427940341 天前
java-UI自动化selenium+TestNG
java·selenium·自动化