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

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

相关推荐
transitory_truth40 分钟前
POSTMAN使用
测试工具·postman
Wpa.wk3 小时前
接口自动化 - 解决大量响应数据字段的格式断言 -Json-schema
运维·经验分享·测试工具·自动化·json·接口测试
Wpa.wk5 小时前
接口自动化 - 接口组合业务练习(CRUD组合)-REST-assure(Java版)
java·运维·经验分享·测试工具·自动化·接口自动化
天才测试猿21 小时前
Selenium测试框架快速搭建详解
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
Wpa.wk1 天前
接口测试-多层嵌套响应处理-JSONPath使用(Java版)
java·前端·经验分享·python·测试工具·jsonpath
yenggd2 天前
wireshark常规用法
测试工具·wireshark·php
我送炭你添花2 天前
Pelco KBD300A 模拟器:06+3.从教学级到企业级工程化转型(二次迭代)
python·测试工具·运维开发
会打莎士比亚的猴子2 天前
tcpdump移植
网络·测试工具·tcpdump
KevinGuo4572 天前
Selenium3自动化测试实战——基于python语言
开发语言·python·selenium
white-persist2 天前
【内网运维】Netstat与Wireshark:内网运维溯源实战解析
运维·网络·数据结构·测试工具·算法·网络安全·wireshark