编码的UI- WPF应用程序控制检测不一致. [英] Coded UI- WPF Application Control Detection is not consistent.

查看:73
本文介绍了编码的UI- WPF应用程序控制检测不一致.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个WPF应用程序,它使用一些DevEx控件和常规WPF控件.我们正在尝试使用Microsoft的编码UI工具来自动执行相同操作.当我启动应用程序并使用编码的UI测试生成器检测控件时(将鼠标悬停在 控制并按Crtl + I)它可以检测到控制.如果我重新启动该应用程序,则不会检测到相同的控件.相反,它会悬停在其他窗格上.

We have a WPF Application which uses some of the DevEx controls and regular WPF Controls. We are trying to automate the same using the Coded UI tool from Microsoft. When i launch the application and use coded UI Test Builder to detect the controls (Hover on Control and Press Crtl+I) it detects the control. Same application if i re-launch it do-not detect the same control.Instead it hovers over some other pane. 

执行自动化时的行为相同.为什么这种不一致的行为?.如何使其一致??

Same is the behavior when Automation is executed. Why this inconsistent behavior  ?.How to make it consistent  ?. 

谢谢Vinay

推荐答案

您可能要共享一些日志详细信息或更多有关您所面临问题的信息?

You might want to share some log details or more details about the issue you are facing??

您是否检查了这些有问题的控件是否附有任何唯一属性?

Did you check if there are any unique property attached to these problematic controls?

您可能想了解编码UI的对象识别机制.... msdn中的简单搜索可以为您提供许多有用的链接

You might want to understand the object identification mechanism of coded-UI....simple search in msdn can give you number of helpful links

您可以通过以下几种方式来增强标识:

You can enhance the identification in several ways:

1)从上下文菜单中选择属性",您将在属性编辑器中看到所选对象的搜索属性"和过滤器属性".

1) Select the ‘Properties’ from context menu and you will see ‘Search Properties’ and ‘Filter Properties’ of the selected object in the Property Editor.

2)如Crystal Zhu所建议的构建扩展

2) Build extension as suggested by Crystal Zhu http://social.msdn.microsoft.com/Forums/en-US/255e26de-9bf3-4b45-8421-5a290650dedb/coded-ui-test-on-devexpress-control-popup?forum=vstsstart

检查DevEx的编码ui扩展

Check coded ui extension for DevEx

https://documentation.devexpress.com/#CodedUIExtension/CustomDocument11028


这篇关于编码的UI- WPF应用程序控制检测不一致.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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