Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm updating to version 2.40 and was looking at the change log.

It says "Now provide an option to hide command prompt window for driver service executables (IEDriverServer.exe, chromedriver.exe, etc.) in .NET bindings."

I can't find what setting to use to make this happen. How do I do it?

share|improve this question
up vote 3 down vote accepted

Yes, you can hide command prompt window now in Selenium 2.40.0. I was writing a blog article about this earlier, which you might want to have a look here.

Please note that hiding command prompt window is not recommended.


var driverService = ChromeDriverService.CreateDefaultService();
driverService.HideCommandPromptWindow = true;

var driver = new ChromeDriver(driverService, new ChromeOptions());


var driverService = InternetExplorerDriverService.CreateDefaultService();
driverService.HideCommandPromptWindow = true;

var driver = new InternetExplorerDriver(driverService, new InternetExplorerOptions());


var driverService = PhantomJSDriverService.CreateDefaultService();
driverService.HideCommandPromptWindow = true;

var driver = new PhantomJSDriver(driverService);
share|improve this answer
Interesting that it is an option, even though it is not suggested. Do you know an acceptable use case for this? – Aligned Mar 5 '14 at 20:01
@Aligned: If someone is using Selenium to develop an application that runs on client's computer. So it is a good idea to hide command window. Otherwise for testing purposes, I can't think of any. – Yi Zeng Mar 5 '14 at 20:30
@Aligned It's an option because enough people who use the .NET bindings asked for it, even though the maintainer of the .NET bindings believes it to be a mistake to hide the window. If, for some reason, your WebDriver code fails, and incorrectly doesn't call the .Quit method, with the command prompt window showing, it's blatantly obvious there's an extra process running. With the command prompt window hidden, it's not obvious. – JimEvans Mar 26 '14 at 22:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.