简体   繁体   English

Selenium 边缘驱动静默模式

[英]Selenium Edge Driver Silent Mode

I currently have a working python script leveraging Selenium driver for Edge browser.我目前有一个有效的 python 脚本,它利用 Edge 浏览器的 Selenium 驱动程序。 I need this script to run as job but due to security setting SQL Agent and Windows agent cant open the browser to scrape webpage.我需要此脚本作为作业运行,但由于安全设置 SQL 代理和 Windows 代理无法打开浏览器来抓取网页。 I would need script to run in silent mode without opening the edge browser window.我需要脚本在不打开边缘浏览器的情况下以静默模式运行 window。

This article seems to be what I need but it is chrome.这篇文章似乎是我需要的,但它是 chrome。

https://stackoverflow.com/questions/62137334/disable-console-output-of-webdriver-using-selenium-in-python

I dont post script because the connections and data in script have connections to a private company intr.net site.我不发布脚本,因为脚本中的连接和数据与私人公司 intr.net 站点有连接。

Use:利用:

var options = new EdgeOptions();
options.AddArguments("--headless");

You can also hide the driver console window:也可以隐藏司机控制台window:

var options = new EdgeOptions();
options.AddArguments("--headless");
options.AddArgument("--no-default-browser-check");
var chromeDriverService = EdgeDriverService.CreateDefaultService();
chromeDriverService.HideCommandPromptWindow = true;

var driver = new EdgeDriver(chromeDriverService, options);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python selenium 3 Edge web 驱动程序错误 - Error in python selenium 3 Edge web driver Selenium Driver for Edge 获取恒定版本错误 - Selenium Driver for Edge getting constant version error Edge 浏览器驱动程序未在“Selenium”中启动 - Edge browser driver does not launch in "Selenium" Python Selenium Inte.net Explorer 模式下的 Edge 浏览器 - Python Selenium Edge Browser in Internet Explorer mode 在无头模式下使用 Selenium Chrome 驱动程序打印 PDF - Printing a PDF with Selenium Chrome Driver in headless mode 如何在最新版本的 Selenium 中以无头模式运行 Edge? - How can I run Edge in headless mode in the latest version of Selenium? Selenium Python:Chrome 驱动程序的无头模式下的空缓存 - Selenium Python: Empty cache in headless mode for chrome driver Selenium Firefox Python 在无头模式下运行 初始化驱动程序超时 - Selenium Firefox Python running in headless mode Timeout on initializing driver 带有 MS Edge 浏览器的 Python (Selenium):'Connection aborted.', ConnectionResetError(10054, ...)“Microsoft Web Driver 已停止工作” - Python (Selenium) with MS Edge browser: 'Connection aborted.', ConnectionResetError(10054, ...) "Microsoft Web Driver has stopped working" 如何使用 python 和 selenium 在 Internet Explorer(IE)模式下打开 Microsoft Edge? - How to open Microsoft Edge in Internet Explorer(IE) Mode using python and selenium?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM