Hide/Silence ChromeDriver window

user3240928 picture user3240928 · Mar 5, 2016 · Viewed 27.7k times · Source

When I launch Selenium's WebDriver (Chromedriver). A console window (chromedriver.exe) runs and it opens Chrome. I need to know how I can hide those like a silent mode because I get messy when there are too many open. I am using C#.

Answer

mscrivo picture mscrivo · Aug 25, 2017

As of Chrome 59, you can now also hide the chrome browser window by using headless mode:

options.AddArgument("headless");

and in combination with:

ChromeDriverService service = ChromeDriverService.CreateDefaultService();
service.HideCommandPromptWindow = true;

it runs in complete silence.