命令提示符中添加 --remote-debugging-port=9222 --user-data-dir=“D:selenium_data“

时间:2025-03-18 15:51:44

命令提示符中输入:

chrome.exe --remote-debugging-port=9222 --user-data-dir="D:\selenium_data"

并在python中输入,

option.add_experimental_option("debuggerAddress", "127.0.0.1:9222")

可是实现使用selenium对当前打开的chrome界面进行接管