简体   繁体   English

当浏览器类型为IE时,我从TFS触发脚本时出现错误

[英]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屏幕截图。

enter image description here 在此处输入图片说明

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.

相关问题 当我尝试从 Unity StandardAssets 脚本访问“EnginePower”时出现错误 - I'm getting an error when I try to access `EnginePower` from Unity StandardAssets script TFS 2010 - 为什么我在模拟时会收到“TF30063您无权访问..”错误? - TFS 2010 - Why am I getting “TF30063 You are not authorized to access..” error when impersonating? 从.Net c#中的TFS提取数据时,WorkItemStore.Query(“ YourQuery”)获取错误 - WorkItemStore.Query(“YourQuery”) Getting Error when fetching data from TFS in .Net c# 错误,当我使用Selenium C#初始化IE浏览器时 - Error, when I'm initializing IE browser using Selenium C# 尝试从C#运行Powershell脚本时出现错误 - Getting error when trying to run powershell script from C# 从onchange触发.click()时,IE9上出现“ SCRIPT5访问被拒绝”错误 - “SCRIPT5 Access is denied” error on IE9 when firing .click() from onchange 当我使用实体框架调用存储过程时获得JSON作为结果时返回类型错误 - Return type error when i'm getting JSON as result when calling stored procedure using entity framework 自动化脚本以触发 TFS 中的构建 - Automate script to trigger build in TFS 将代码库从一台主机移到另一台主机时出现错误 - Getting error when I moved codebase from one host to another 当我尝试 Output 时出现错误 从下拉列表中选择了什么 - Getting an Error When I Try To Output What Was Chosen From a Dropdown
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM