FindTopWindowByAutomationId
Find a top level window matching the automation ID.
AutomationControl FindTopWindowByAutomationId(string automationId);
Parameters
automationId:
The Windows Automation ID.
Return Value
An AutomationControl object.
Remarks
Automation Elements have an automationID to aid with selection and identification. It is intended to be a static value that is set at design time. Note that this ID might be empty. The depth of the tree searched is limited to MaxSearchDepth, the default value is 3.
Example
AutomationControl myControl = FindTopWindowByAutomationId("1234");