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)
相关推荐
起个破名想半天了37 分钟前
五秒盾解决方案之Selenium
selenium·cloudflare·反爬
robinspada42 分钟前
用mitmproxy替代selenium-wire
selenium·测试工具·mitmproxy·selenium-wire
我的xiaodoujiao43 分钟前
从 0 到 1 搭建完整 Python 语言 Web UI自动化测试学习系列 17--测试框架Pytest基础 1--介绍使用
python·学习·测试工具·pytest
Bellafu66643 分钟前
selenium的css定位方式有哪些
css·selenium·tensorflow
Bellafu6661 小时前
selenium对每种前端控件的操作,python举例
前端·python·selenium
Bellafu6661 小时前
下载selenium-ide及使用
ide·selenium·测试工具
将车2441 小时前
自动化测试脚本环境搭建
python·测试工具·自动化
天才测试猿3 小时前
WebUI自动化测试:POM设计模式全解析
自动化测试·软件测试·python·selenium·测试工具·设计模式·测试用例
郁大锤8 小时前
在 Windows 下安装与快速上手 Wireshark(抓包工具)
windows·测试工具·wireshark
2501_9159090613 小时前
tcpdump 抓包数据分析实战,命令、过滤、常见故障定位与真机补充流程
网络·测试工具·ios·小程序·uni-app·iphone·tcpdump