编码UI- WaitForCondition期间的控制开关
本文关键字:控制 开关 UI- WaitForCondition 编码 | 更新日期: 2023-09-27 18:10:27
我想知道为什么我的行得到开关当我调用WaitForCondition
isStatusDone的定义方式如下:
static int a = 0;
private static bool isStatusDone(UITestControl control) {
WinRow row = (WinRow)control;
AbstractedGUI.clickOnMainWindow("Refresh");
WinCell attentionCell = new WinCell(row);
attentionCell.SearchProperties[WinCell.PropertyNames.Value] = "Attention";
Debug.WriteLine(a + row.FriendlyName + " " + System.DateTime.Now.ToLongTimeString());
a++;
return attentionCell.Exists;
}
有人知道为什么行切换吗?
输出为:
测试名称:TestMethod
测试结果:通过
Result StandardOutput:
调试跟踪:
0MarginRecordMessage row 1 11:54:58 AM
1MarginRecordMessage row 0 11:55:03 AM
2MarginRecordMessage row 0 11:55:08 AM
3MarginRecordMessage row 0 11:55:13 AM
4MarginRecordMessage row 0 11:55:18 AM
5MarginRecordMessage row 0 11:55:23 AM
6MarginRecordMessage row 0 11:55:28 AM
7MarginRecordMessage row 0 11:55:33 AM
8MarginRecordMessage row 0 11:55:38 AM
9MarginRecordMessage row 0 11:55:44 AM
10MarginRecordMessage row 0 11:55:49 AM
我发现我需要在调用
之前添加一行control.SearchProperties [WinRow.PropertyName。Name = row.name
因为这会将搜索属性设置为我最初寻找的内容所以当它刷新时它仍然具有搜索