Hide command prompt window in Selenium WebDriver .NET binding
As of Selenium 2.40.01, Selenium WebDriver's .NET binding supports hiding the command prompt window created by ChromeDriver, IEDriver or PhantomJSDriver. The following code snippets demonstrate how to achieve it in C#.
However, according to the developer2, it is highly discouraged to use this option, because this will make it hard to debug zombie driver processes when WebDriver code exits unexpectedly. Also note that currently PhantomJSDriver
has a constructor which takes in PhantomJSDriverService
parameter alone, while ChromeDriver
and InternetExplorerDriver
don't have this constructor overload. A pull request has been made here, which will add this missing constructor overload to these two classes.
Environment Tested:
Windows 7, Selenium 2.40.0
Chrome 33 + ChromeDriver 2.9, IE 10 + IEDriver 2.40.0, PhantomJSDriver 1.9.7