使用编码的UI识别WPF应用程序的颜色(VSTS 2015) [英] Identifying color for a WPF application using Coded UI(VSTS 2015)

查看:120
本文介绍了使用编码的UI识别WPF应用程序的颜色(VSTS 2015)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用编码的UI验证任何WPF控件(例如文本)的颜色吗?

Can we validate color of any WPF control (let's say text) with Coded UI

推荐答案

我的朋友您好,

Hi my friend,

我们无法识别WPF控件的颜色属性.在我的WPF项目中,我创建了一个TextBox控件并将背景设置为黑色,然后使用编码的UI测试生成器"获得了所有属性.请参考以下屏幕截图:

We could not identify the color property of WPF control. In my WPF project, I created a TextBox control and set the background as black, then I get all the properties with Coded UI Test Builder. Please refer to the following screenshot:

其中没有背景属性.我已经尝试过Button,Label和其他控件,这些控件无法识别背景属性.因此,我认为编码的UI测试生成器无法识别背景属性.

There is no background property in it. And I have tried Button, Label and other controls that there is no background property could be identified. So I think Coded UI Test Builder could not identify the background property.

请参考上面的屏幕截图,以判断哪些WPF控件属性可以由编码的UI测试生成器"识别.

Please refer to above screenshot to judge which WPF control properties could be identified by Coded UI Test Builder.

此致

奥斯卡


这篇关于使用编码的UI识别WPF应用程序的颜色(VSTS 2015)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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