[英]Getting Error when i trigger the script from TFS when the browser type is IE
We are doing the Continuous integration using C# selenium for web base application. 我们正在针对Web基本应用程序使用C#硒进行持续集成。 We have trigger the script from TFS using the test agent.
我们已经使用测试代理从TFS触发了脚本。 But the build or the execution is getting successful if the browser type is chrome.
但是,如果浏览器类型为chrome,则构建或执行将成功完成。 For the IE bower we are facing the issue.
对于IE凉亭,我们面临着这个问题。 Please help us in resolving this issue.
请帮助我们解决此问题。
Note: When we trigger manual execution from server , execution in IE happens successfully. 注意:当我们从服务器触发手动执行时,将在IE中成功执行。
Below is my Exception screenshot. 以下是我的Exception屏幕截图。
Seems it related to the Webdriver. 似乎与Webdriver有关。
Just try below things to check if that works for you: 只需尝试以下操作即可检查它是否适合您:
1 .Try the latest IE 1。尝试最新的IE
2 .Include setting capabilities of the browser when starting it. 2。启动时包括浏览器的设置功能。 Try the below settings and see if it works to help it stay focused on the newly opened window.
尝试以下设置,看看它是否可以帮助使其专注于新打开的窗口。
capabilities = new DesiredCapabilities();
capabilities.setCapability("ignoreProtectedModeSettings", true);
capabilities.setCapability("ie.ensureCleanSession", true);
webDriver = new InternetExplorerDriver(capabilities);
3 .Edit the browser profile and increase timeout to 180 seconds or more from default 60 seconds. 3。编辑浏览器配置文件,并将超时从默认的60秒增加到180秒或更多。 Please note that this constructor is available in .Net API only.
请注意,此构造函数仅在.Net API中可用。
For internet explorer driver, you can use below syntax. 对于Internet Explorer驱动程序,可以使用以下语法。
driver = new InternetExplorerDriver(@"z:\seleniumc", new InternetExplorerOptions(),TimeSpan.FromMinutes(5));
Refer to Selenium Webdriver for details. 有关详细信息,请参考Selenium Webdriver 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.