當我使用方法uiitem.WaitForControlExist(毫秒);執行等待時間過長。更多的指定參數。uiitem.WaitForControlExist(毫秒);等待時間太長
有什麼想法?
上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秒。
在此先感謝
編輯問題以給出問題的更多細節是很好的。您還應該添加關於找到問題解決方案所做的研究的詳細信息。我的回答提出了一些需要調查的地方。遵循這些建議你學到了什麼? – AdrianHHH