0

I currently have a working python script leveraging Selenium driver for Edge browser. 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. I would need script to run in silent mode without opening the edge browser window.

This article seems to be what I need but it is 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 intranet site.

Leo Torres
  • 673
  • 1
  • 6
  • 18
  • Which exact feature are you looking as in Silent Mode as per [this discussion](https://stackoverflow.com/questions/62137334/disable-console-output-of-webdriver-using-selenium-in-python) – undetected Selenium Feb 11 '22 at 21:54
  • Yes for edge I need this to execute with out opening a browser window. – Leo Torres Feb 14 '22 at 16:16

1 Answers1

1

Use:

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

You can also hide the driver console 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);