[英]Running Internet Explorer selenium web driver in private mode c#
I'm building UI automation tests using selenium, and I want to test our product with internet explorer browser. 我正在使用Selenium构建UI自动化测试,并且想使用Internet Explorer浏览器测试我们的产品。 I'm trying to create InternetExplorerDriver using selenium 3.4. 我正在尝试使用硒3.4创建InternetExplorerDriver。
But when I set the options to run in private mode, the IE browser doesn't launch. 但是,当我将选项设置为在私有模式下运行时,IE浏览器不会启动。 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. 该代码在VS 2017,Windows 10,64位中运行,并尝试运行32位Internet Explorer驱动程序。
Solved by using IEDriverServer_x64_3.8.0. 通过使用IEDriverServer_x64_3.8.0解决。 probably bug in the 3.9 and the 32 bit versions 可能是3.9和32位版本中的错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.