Selenium grid launching remote IE browser as run as administrator

你离开我真会死。 提交于 2021-01-29 09:05:19

问题


I have a selenium grid setup and from client machine need to run the grid and it is hitting an URL in remote machine in IE.IE is getting launched in remote machine.The code is in C#. below is the code I want selenium to launch IE as "Run as Administrator" mode. Can some one help me with this ?

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);


回答1:


Looks like selenium does not provide an option to launch the IE browser as a different user.

One workaround can be to log on that machine as an administrator and then try to run the code. You can test and see whether it helps or not.

References:

  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



来源:https://stackoverflow.com/questions/61797419/selenium-grid-launching-remote-ie-browser-as-run-as-administrator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!