selenium 对当前已经打开的窗口进行调试

要求selenium版本4.11.2

使用cmd进入chrome浏览器的路径执行如下命令,创建一个端口为9522的窗口

复制代码
chrome.exe --remote-debugging-port=9522 --user-data-dir="D:\selenium\AutomationProfile"

代码里面创建实例,调用driver即可

复制代码
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option("debuggerAddress","127.0.0.1:9527")
driver = webdriver.Chrome(options=options)
相关推荐
lakernote3 小时前
EasyPostman 重大更新:正式支持插件模式,当前已上线 5 个官方插件
java·测试工具·开源·postman
oi..6 小时前
Flag入门—Flag在返回包中
网络·笔记·测试工具·安全·网络安全
Vic101016 小时前
Wireshark 解密 HTTPS 流量
测试工具·https·wireshark
月亮!12 小时前
6大AI测试工具极限压测:微软TuringAI竟率先崩溃
java·人工智能·python·测试工具·microsoft·云原生·压力测试
学习指针路上的小学渣12 小时前
Selenium笔记
python·selenium
llilian_1615 小时前
音频分析仪 专业音频分析仪破解行业测试痛点实战解析 音频测试仪 专业音频分析仪
大数据·功能测试·单片机·测试工具·音视频
123过去1 天前
wifi-honey使用教程
linux·网络·测试工具
123过去1 天前
pixiewps使用教程
linux·网络·测试工具·算法·哈希算法
测试老哥1 天前
Web自动化测试:Cypress 测试框架概述
自动化测试·软件测试·python·selenium·测试工具·职场和发展·测试用例
123过去1 天前
reaver使用教程
linux·网络·测试工具·智能路由器