我刚开始使用Coded UI测试。 UITestControl类中的FilterProperties和SearchProperties似乎做同样的事情,我错过了什么?
文档也没有帮助:
UITestControl.FilterProperties
获取用于消除控件歧义的属性 - 值对集合。
UITestControl.SearchProperties
获取用于标识控件的属性 - 值对集合。
答案 0 :(得分:1)
编码的UI测试以这样的方式工作。它使用“AND”条件扫描搜索属性的SUT,如果满足所有条件,则Coded UI识别SUT下的UITestControl。如果使用搜索属性,如果未找到UITestControl,则CodedUI开始查找具有“OR”条件的过滤器属性。如果满足任何过滤器属性,则Coded UI将在SUT下找到UITestControl。
希望有所帮助。