问题:Selenium无法连接到Edge浏览器的远程调试端口
(已通过命令行正常启动,但未监测端口。更换端口问题相同。)
```python
# 临时测试:sl.py
from selenium import webdriver
from selenium.webdriver.edge.service import Service as EdgeService
from selenium.webdriver.edge.options import Options
edge_driver_path = "C:\\python\\edge\\msedgedriver.exe"
service = EdgeService(executable_path=edge_driver_path)
edge_options = Options()
edge_options.add_experimental_option("debuggerAddress", "127.0.0.1:9515")
driver = webdriver.Edge(service=service, options=edge_options)
driver.get("http://example.com")
运行反馈:
(与图1问题相同。)
排因:
(Windows防火墙)
(入站规则)
(版本)