This article shows how to make use of UI Automation Framework using WPF to develop an UI Automated application. The UI Automation Library is included in the .NET Framework 3.0/3.5. The concept seems to be straightforward. Every UI control is an "AutomationElement" which can be found through searching from the Parent "AutomationElement". The top AutomationElement is defined as the "RootElement", which is the desktop.
Another way to get the AutomationElement Object to a given Window is by starting a "Process", and then using the Process MainWindowHandle to get the AutomationElement object.
Смотри проект UIAutomation.Sample в TFS project "dmd-dev2\Training\Work"