编码的UI ControlDefinition是“裁剪”的。将其添加到UIMap时的值 [英] Coded UI ControlDefinition is "cropping" the value when you add it to the UIMap

查看:63
本文介绍了编码的UI ControlDefinition是“裁剪”的。将其添加到UIMap时的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我正在尝试在我的UIMap中定义一个控件,以便在我运行测试时找到它。 

I'm trying to define a control in my UIMap so that it can be found when I run the test. 

我采取的步骤非常标准

1)在Visual Studio中打开测试生成器

1) Open the Test Builder in Visual Studio

2)使用十字线来选择/突出显示有问题的控件

2)Use the Cross Hair to select/highlight the control in question

3)将控件添加到UIMap,并使用"加号"。测试生成器左侧窗格中的图标/按钮

3)Add the control to the UIMap with the "Plus" icon/button in the left pane of the Test Builder

我注意到在右侧窗格中ControlDefinition是=" xmlns = QUOT; HTTP://www.w3.org/2000/svg"光标= QUOT;指针" fill =" rgb(78,193,179)" X =" -7.14394" Y =" 45.6"宽度= QUOT; 14.2879"
height =" 139.4""

what I noticed is that in the right hand pane the ControlDefinition is = "xmlns="http://www.w3.org/2000/svg" cursor="pointer" fill="rgb(78, 193, 179)" x="-7.14394" y="45.6" width="14.2879" height="139.4""

但是当控件添加到UIMap时,ControlDefinition是=" ;的xmlns = QUOT; HTTP://www.w3.org/2000/svg"光标= QUOT;指针" fill =" rgb""

However when the control has bee added to the UIMap the ControlDefinition is ="xmlns="http://www.w3.org/2000/svg" cursor="pointer" fill="rgb""

因此选择了错误的控件!

As a result the wrong control is selected!

当我将测试生成器添加到UIMap时,如何让测试生成器包含所有的ControlDefinition值?

How can I get the Test Builder to include ALL the ControlDefinition values when I add it to the UIMap?

推荐答案

嗨朋友,

正在测试什么样的应用程序?我想知道我是否可以在我身边进行复制。

What kind of app are testing? I wonder if I could repro it in my side.

将其添加到 UIMap 后,您是否点击了生成代码标签?生成代码后,我们可以通过编写匹配的代码进行控制。

After add it to UIMap, have you clicked the generate code tab? After generating code we could this control by writing matched code.

因此,请尝试运行测试以查看是否可以捕获控件。

So please try to run your test to see if the control could be captured.

期待您的回复。

 

问候,

Fletcher


这篇关于编码的UI ControlDefinition是“裁剪”的。将其添加到UIMap时的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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