UI自动化 - 从IUIAutomationElement对象中的标签获取文本 [英] UI Automation - Get text from label within a IUIAutomationElement object
问题描述
我有一个特定的IUIAutomationElement,我想从中提取一些标签文本。 IUIAutomationElement的名称为"状态"。正如您所看到的,在Status元素中,有一些标签(它看起来像三个单独的标签。成功,
失败,列表状态。我想获取"失败"标签中的文本。我曾尝试为IUIAutomationElement调用一些属性访问器,但我找不到如何导航到"失败"标签中的单个文本。任何人都知道这样做的方式
?我已附加图像到显示我正在谈论的内容。
谢谢,
I have a specific IUIAutomationElement that I would like to extract some label text from. The IUIAutomationElement has the name " Status ". As you can see, within the Status element, there are a few labels (it looks like three separate labels within. Success,
Failed, List Status. I would like to obtain the text in the "Failed" label. I have tried calling some of the Property Accessors for the IUIAutomationElement, but I cannot find how to navigate to the individual text in the "Failed" label. Anyone know a way
to do this? I have attached an image to display exactly what I am talking about.
Thanks,
-Jason
-Jason
推荐答案
我正在将此主题移至 用于辅助功能和自动化的Windows桌面开发论坛以获得更好的支持。
I'm moving this thread to Windows Desktop Development for Accessibility and Automation forum to get better support.
祝你有个愉快的一天。
这篇关于UI自动化 - 从IUIAutomationElement对象中的标签获取文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!