自定义控件对于UIAutomation不可见 [英] Custom control don't visible for UIAutomation

查看:503
本文介绍了自定义控件对于UIAutomation不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个继承自Control类的控件,

但是该控件在UISpy或UIAVerify中不可见,因此我们无法对其进行测试.

什么是摆脱这个问题的最佳方法?

Throndorin

解决方案

Throndorin,

我相信Control类是WPF,所以我假设您正在使用它.

WPF中的自定义控件通常需要自定义可访问性实现.这是有关该主题的MSDN简介页:
http://msdn.microsoft.com/zh-CN -us/library/cc165614.aspx

这是一个非常详尽的介绍,因此希望对您有所帮助.

,谢谢,
Michael

We have a control which inherits from class Control,

but this control is not visible in UISpy or UIAVerify and so we can't test it.

What is the best way to get rid of this problem?

Throndorin

解决方案

Hi, Throndorin,

I believe the Control class is WPF, so I assume that's what you're using.

Custom controls in WPF generally require custom accessibility implementations.  Here's the MSDN intro page on that topic:
http://msdn.microsoft.com/en-us/library/cc165614.aspx

It's a pretty thorough introduction, so I hope that helps.

Thanks,
Michael


这篇关于自定义控件对于UIAutomation不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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