Selenium网格以管理员身份启动远程IE浏览器



我有一个硒网格设置,从客户端计算机需要运行网格,它在IE的远程机器中点击一个URL。IE正在远程机器中启动。代码是 C# 格式的。 下面是代码 我希望Selenium以"以管理员身份运行"模式启动IE。有人可以帮助我吗?

InternetExplorerOptions options = new InternetExplorerOptions();                        options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
options.EnableNativeEvents = true;
options.ForceShellWindowsApi = true;
driver = new RemoteWebDriver(new Uri("http://10.x.x.10/wd/hub"), DesiredCapabilities.InternetExplorer());
driver = new RemoteWebDriver(new Uri("http://" + remoteIP + ":" + port + "/wd/hub"), DesiredCapabilities.InternetExplorer());
driver.Manage().Window.Maximize();
driver.Navigate().GoToUrl(applicationurl);

看起来硒没有提供以其他用户身份启动IE浏览器的选项。

一种解决方法是以管理员身份登录该计算机,然后尝试运行代码。您可以测试并查看它是否有帮助。

引用:

  1. 硒网格

  2. Java中使用Selenium Webdriver以其他用户身份运行IE

  3. IE 网页驱动程序不支持以其他用户身份运行

最新更新