msedge驱动,无界面+不出现自动测试字样
from msedge.selenium_tools import EdgeOptions
from msedge.selenium_tools import Edge
#浏览器配置
edge_options = EdgeOptions()
# 设置无界面模式,也可以添加其它设置
edge_options.use_chromium = True
edge_options.add_argument('headless')
#不出现自动测试字样
edge_options.add_experimental_option('excludeSwitches', ['enable-automation'])
browser = Edge(options=edge_options, executable_path='msedgedriver.exe')
browser.get(url)