Visual Basic中的UIAutomation(获取控件值的问题) [英] UIAutomation in Visual Basic (Problem in getting value of a Control)

查看:849
本文介绍了Visual Basic中的UIAutomation(获取控件值的问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试使用VB.Net中的UI自动化从应用程序控件中获取文本/标签.
到目前为止,我可以获取应用程序的AutomationElement树并获取控件的值,但是我只能获取IsPasswordProperty设置为false的文本属性, 如果"IsPasswordProperty"设置为true,是否有人可以帮助我使用UI自动化获取元素值?,我尝试获取相同的内容,但在请求时会抛出InvalidOpertaionException.

Hi,
I am trying to get text/labels from application controls Using UI Automation in VB.Net.
So far I am able to obtain AutomationElement tree of application and getting values of controls but I only can get text attributes whose IsPasswordProperty is set to false, Could anybody help me out how to get element values using UI Automation if the ‘IsPasswordProperty’ is set to true, I tried to get the same but it throws an InvalidOpertaionException when requested.

感谢您

推荐答案

 如果它是您编写的应用程序,无需使用UI自动化.所以,为什么需要从其他应用程序上的文本框获取密码?这对我来说有点恶意.
 If it is an application you wrote,  there is no need to use UI Automation.  So,  why do you need to get the passwords from TextBoxes on other applications?  That sounds a little malicious to me.


这篇关于Visual Basic中的UIAutomation(获取控件值的问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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