在Coded UI扩展中,我怎么能'隐藏'一个对象。 [英] In Coded UI extension, how could I 'hide' an object.

查看:57
本文介绍了在Coded UI扩展中,我怎么能'隐藏'一个对象。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我目前正在尝试使用编码的ui进行自动化测试。

Hello, I am currently trying to use coded ui for my automation tests.

问题在于我编写了一个插件来强制使用UIA来编码UI找到对象而不是MSAA,一些对象仍然表现得很奇怪。说一些对象仍然是一些包含在"客户端"控件中的对象。此外,一些控件
喜欢托管窗口等。我认为我们的测试不应该考虑它们。无论如何通过扩展管理器代理或元素代理我实际上可以隐藏这些元素(比如当前目标元素是A,实际上会重定向到
它的第二个孩子)?

The problem for this is when I wrote a plugin to enforce coded UI to use UIA to find object instead of MSAA, some of the objects still behave quite weirdly. Say some of the objects are still some how wrapped in a 'client' control. Also, some of the controls like the hosting window etc. I don't think our tests should actually consider them. Is there anyway by extending the manager proxy or element proxy I could actually hide such elements (like when the current targeted element is A, will actually redirect to the 2nd child of its)?

非常感谢,

JX

推荐答案

嗨JX,

感谢您的帖子。

>>我写了一个插件来强制执行编码的UI以使用UIA来查找对象而不是MSAA

原谅我的理解不足,您是否介意与实例分享一段代码示例?

Forgive my poor understanding, would you mind sharing a piece of code sample with an instance?

据我所知,编码的UI测试不知道或关心如何编写被测试的应用程序。编码的UI测试使用应用程序的UI控件提供的MSAA或UIA接口。需要编写
UI控件以支持MSAA或UIA。用于WPF和Windows窗体的Microsoft库中的UI控件支持MSAA或UIA。自定义控件可能支持也可能不支持MSAA或UIA,因此可能不支持编码UI。
UI控件的第三方库通常提供构建在Microsoft UI控件之上的自定义控件。

>>我不认为我们的测试应该考虑它们。

这是否意味着你想跳过一些父控件并直接捕获子控件? 
作为编码的UI控件搜索层次结构,在播放过程中需要一些顶级控件,所以我认为我们不能跳过它们。

Does it mean you want to skip some parent control and capture the child control directly?  As Coded UI control searching hierarchy, some top level control is needed during playback, so I don't think we could just skip them.

期待您的回复。

如果我误解,请随时告诉我。

Please feel free to let me know if I misunderstood.

 

Best问候,

Fletcher

Fletcher


这篇关于在Coded UI扩展中,我怎么能'隐藏'一个对象。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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