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

问题描述 投票:0回答:1

我有一个硒网格设置,并且需要从客户端计算机运行网格,并且它在IE中的远程计算机中命中URL。IE在远程计算机中启动。代码在C#中。下面是代码我希望硒以“以管理员身份运行”模式启动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);

c# selenium-webdriver internet-explorer selenium-grid selenium-iedriver
1个回答
0
投票

像硒一样,硒没有提供以其他用户身份启动IE浏览器的选项。

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

参考:

  1. Selenium Grid

  2. Running IE as a different user with Selenium Webdriver in Java

  3. IE Webdriver do not support run as other user

© www.soinside.com 2019 - 2024. All rights reserved.