实例属性设置为值"2",这会导致search.properties查找控件出现问题 [英] Instance property get set to value '2' which causes problem with search.properties finding the control

查看:81
本文介绍了实例属性设置为值"2",这会导致search.properties查找控件出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用编码的UI测试生成器完成tescase的录制并回放测试后,

由于以下原因而失败

播放未能找到具有给定搜索属性的控件".

然后,我返回UIMap.uitest XML文件,并更改"Instance"的值.设为"0"或"1"

测试回放正常.

问题在于,当我记录其他测试时,实例"的值会变为0.对于相同的"UIItemCleint"重置为"2".导致第一个测试再次失败.

我已附上了"UI控制图"的屏幕截图.和属性"窗口以红色圈出.

出于某种原因"UIItemClient到UIItemClient4";没有问题,因为它们没有Instance属性,但可以开始

从"UIItemClient5"开始,问题开始,其中包括实例".值作为搜索属性的一部分.

我不确定"UI控制图"是否会流程还可以.

在这方面的任何帮助将不胜感激,因为手动重置"Instance"的值非常烦人.为

UIItemClient5及更高版本.

解决方案

据我所知,当您对一个项目的动作进行记录时,如果其搜索属性的值与父元素中的所有其他项目相同,则编码的UI将记录实例属性(表示集合中的索引) .  

因此,请检查那些UIItemClient控件,以查看一个UIItemClien控件是否具有与UIItemClient5相同的searchproperties值.

如果是,则可以在应用程序中更改某些属性的值以使其与众不同.

最好的问候


Once I finish recording the tescase using Coded UI Test Builder and playback my test,

it failes due to following reasons

"Playback failed to find the control with given search properties".

Then I go back in UIMap.uitest XML file and change the value of "Instance" to either "0" or "1"

the test playback is fine.

The problem is that when I record some other test, the value of the "Instance" for same "UIItemCleint" resets to "2" which causes the first test to fail again.

I have attached the screenshot of the "UI Control Map" and Properties window circled with red color.

For some reason "UIItemClient thru UIItemClient4" have no issues as they do not have Instance property, but starting

from "UIItemClient5 the problem starts which include "Instance" value as part of search property.

I am not sure if the the "UI Control Map" flow is OK.

Any help in this regard would be greatly appreciated as it is very annoying to manually reset the value of "Instance" for

UIItemClient5 and later.

解决方案

Hi,

As far as I know, when you record an action on an item with the same value for the search property as all the other items within the parent element, Coded UI will record the instance property (meaning the index in the collection).  

So please check those UIItemClient controls to see whether one UIItemClien control has the same searchproperties value with UIItemClient5.

If yes, you can change some properties’ value in the application to make them different.

Best regards,


这篇关于实例属性设置为值"2",这会导致search.properties查找控件出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆