如何区分两个识别控件? [英] How to differentiate two identic controls ?

查看:67
本文介绍了如何区分两个识别控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我基本上都是所有MS技术的新手,所以如果我不使用正确的词汇,请原谅。

i'm basically a newbie in all the MS-technologies so forgive if me I don't use the right vocabulary.

好吧,我正在使用编辑器提供的控件开发应用程序。在一个页面上,我有2倍相同的控件,这两个控件无法通过播放引擎区分。

Well, I'm working on an app using controls provided by an editor. On one page, I've 2 times the same control and these 2 controls cannot be differentiateb by the playback engine.

当我使用CodedUITestBuilder查看控件时,我发现这些属性:

When I look at the controls using the CodedUITestBuilder, I find these properties:

First Control

ClassName:SysListView32

ControlType:Window

TechnologyName:MSAA

HelpText:

AccessKey:

ControlName:

ControlId:0

AccessibleName:
$
FriendlyName:

姓名:
$


一个孩子(我是一个)我感兴趣):

ControlType:List

TechnologyName:MSAA

HelpText:

AccessKey :
$
ControlName:

ControlId:0

SelectedItemsAsString:ITEM

ClassName:SysListView32

FriendlyName:

姓名:



第二次控制

ClassName:SysListView32

C. ontrolType:Window

TechnologyName:MSAA

HelpText:

AccessKey:

ControlName:

ControlId:0
$
AccessibleName:

FriendlyName:

姓名:

对应的孩子:

ControlType:列表

TechnologyName:MSAA

HelpText:
$
AccessKey:

ControlName:

ControlId:0

SelectedItemsAsString:

ClassName:SysListView32

FriendlyName:

姓名:

Corresponding Child:
ControlType : List
TechnologyName : MSAA
HelpText :
AccessKey :
ControlName :
ControlId: 0
SelectedItemsAsString :
ClassName : SysListView32
FriendlyName :
Name :

 

  ;

你能告诉我应该使用哪个属性来区分2个控件吗?

Could you tell me which property should be used to differentiate the 2 controls ?

我读过这个http://blogs.msdn .com / b / siddharthapandey / archive / 2010/01/15 / understanding-the-window-search-and-windowed-properties.aspx,但我不确定我究竟该怎么做。

I've read this http://blogs.msdn.com/b/siddharthapandey/archive/2010/01/15/understanding-the-window-search-and-windowed-properties.aspx , but I'm not sure to understand exactly what I should do.

 

谢谢..

 

 

 

 

推荐答案

由encodeuitest构建器生成的代码是什么?您正在寻找的属性是WinControl.PropertyNames.Instance。您需要提供在应用程序中重复的正确控件实例。如果我能帮助我更多
,请告诉我。

What is the code generated by the codeduitest builder? The property you are looking for is WinControl.PropertyNames.Instance. You need to provide correct instance of the control which is duplicate in the application. Please let me know if I can help more on this.

 


这篇关于如何区分两个识别控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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