Sometimes, it's useful to search for a window or a top-level control (a pane or context menu) from the top of the Automation tree.
Get-UIADesktop | Get-UIAControlChildren | %{ $_ | Read-UIAControlName; $_ | Read-UIAControlAutomationId; }
The above script read names and automationIds of all top-level objects that are available, like menus and panes (TaskBar, etc).

Working with Metro UI, it's even a must to start from the top as Metro UI applications grow from non-Metro UI top of the Automation tree:
# from BGShell or UIARunner
Get-UIADesktop;
Show-UIAMetroStartScreen;
Get-UIAListItem Music;

Last edited Feb 27, 2013 at 5:53 AM by xinliu, version 2

Comments

No comments yet.