Selenium网格以管理员身份运行启动远程IE浏览器 [英] Selenium grid launching remote IE browser as run as administrator

查看:110
本文介绍了Selenium网格以管理员身份运行启动远程IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

推荐答案

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

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.

参考文献:

  1. 硒网格

将IE作为Java中使用Selenium Webdriver的其他用户

IE Webdriver不支持以其他方式运行用户

这篇关于Selenium网格以管理员身份运行启动远程IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆