Reputation: 1890
I'm using System.Windows.Automation to get some UI control text values from labels in a group box. I'm trying to use spy++ to get the control names I'm looking for.
AutomationElement Root = AutomationElement.RootElement;
AutomationElement MainForm = Root.FindFirst(TreeScope.Descendants,new PropertyCondition(AutomationElement.AutomationIdProperty,"control name im looking for"));
What value represents what I would be searching for? For example would I change it to... ...AutomationIdProperty,"Window 00031BB0"));
I'm not sure what all the information given by spy++ actually represents.
Thank you for any help!
Upvotes: 1
Views: 2561
Reputation: 887385
You're looking for the UI Automation Inspector, part of the Windows SDK, which shows the complete UI automation tree.
Upvotes: 5