【发布时间】:2021-05-19 09:46:55
【问题描述】:
我想以私有模式打开 IE 来运行这组测试用例。浏览器打不开。它显示错误为
The HTTP request to the remote WebDriver server for URL {URL} timed out after 60 seconds
示例代码:
InternetExplorerOptions options = new InternetExplorerOptions()
{
ForceCreateProcessApi = true,
BrowserCommandLineArguments = "-private",
};
IWebDriver driver = new InternetExplorerDriver("C:\\Reports", options);
driver.Navigate().GoToUrl("https://www.google.com");
我还在注册表编辑器中将 TabProcGrowth 更改为 0。
如何以私有模式打开IE运行测试用例?我想在我的代码中更新的任何内容。提前致谢。
【问题讨论】:
-
尝试将
PageLoadStrategy = PageLoadStrategy.Eager添加到options并再次尝试运行您的代码。看看有没有区别。如果问题仍然存在,我建议您告知我们您用于进行此测试的 IE 浏览器、Web 驱动程序和 selenium 的确切版本?
标签: c# selenium selenium-webdriver internet-explorer private