I'm building UI automation tests using selenium, and I want to test our product with internet explorer browser. I'm trying to create InternetExplorerDriver using selenium 3.4.
But when I set the options to run in private mode, the IE browser doesn't launch. The options I set are:
ForceCreateProcessApi = true,
BrowserCommandLineArguments = "-private".
private IWebDriver CreateInternetExplorerDriver()
{
InternetExplorerOptions options = new InternetExplorerOptions()
{
IntroduceInstabilityByIgnoringProtectedModeSettings = true,
IgnoreZoomLevel = true,
InitialBrowserUrl = "about:InPrivate",
EnsureCleanSession = true,
BrowserCommandLineArguments = "-private",
ForceCreateProcessApi = true
};
// Create a webdriver instance to automate the browser.
return new InternetExplorerDriver(_webDriverDirectory, options, TimeSpan.FromSeconds(DriverCommandTimeout * 3));
}
The code run in VS 2017, windows 10 ,64-bit, and try to run Internet explorer driver 32-bit.