c# - 在 Spy++ 中,控件名称的值是多少?

标签 c# .net-4.5 ui-automation spy++

我正在使用 System.Windows.Automation 从组框中的标签中获取一些 UI 控件文本值。我正在尝试使用 spy++ 来获取我正在寻找的控件名称。

enter image description here

AutomationElement Root = AutomationElement.RootElement;
AutomationElement MainForm = Root.FindFirst(TreeScope.Descendants,new PropertyCondition(AutomationElement.AutomationIdProperty,"control name im looking for"));

什么值代表我要搜索的内容?例如,我会把它改成…… ...AutomationIdProperty,"窗口 00031BB0"));

我不确定 spy++ 给出的所有信息实际上代表什么。

感谢您的帮助!

最佳答案

您正在寻找 UI Automation Inspector ,Windows SDK 的一部分,显示了完整的 UI 自动化树。

关于c# - 在 Spy++ 中,控件名称的值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14608818/

相关文章:

c# - 谷歌驱动器 API : I have to fetch only files in that folder without trashed files

c# - 解析格式为 "2013-Jan-31"的日期时间会抛出错误

具有大量滚动功能的 iOS UI 自动化

c# - 无法比较通用值

c# - 手榴弹在错误的位置生成

entity-framework - 如何在 Visual Studio 2013 中为 sqlite 配置 Entity Framework 6

javascript - 自动化基于 HTML5/AngularJS 的 UI,其中没有在元素上添加 id

visual-studio - 使用 VS 11、.NET 4.5 和 Entity Framework 时生成错误

c# - 无法让 ApplyCurrentValues(Entity) 在 Entity Framework 5 中工作