【发布时间】:2014-01-21 11:04:27
【问题描述】:
当我使用方法 uiitem.WaitForControlExist(milliseconds);执行等待时间过长。更多的指定参数。
有什么想法吗?
只是 UIMap.cs 文件中的一个示例:
public void AnyAlertClickNo(int seconds)
{
#region Variable Declarations
WinWindow uIAlert = this.UIAlertWindow;
WinButton uINoButton = this.UIAlertWindow.UIAnswerPanel.UINoButton;
#endregion
if(uIAlert.WaitForControlExist(seconds*1000)){
Mouse.Click(uINoButton, new Point(20, 10));
}
}
电话可能是:
Any_UIMap aaa = new Any_UIMap();
aaa.AnyAlertClickNo(3);
我不知道为什么这段代码要等待这个警报大约 15-20 秒。
提前致谢
【问题讨论】:
-
编辑问题以提供问题的更多细节是好的。您还应该添加您为找到问题的解决方案所做的研究的详细信息。我的回答建议了一些领域供您调查。您从这些建议中学到了什么。
标签: testing visual-studio-2012 automated-tests ui-automation coded-ui-tests