-
Notifications
You must be signed in to change notification settings - Fork 32
Home
Descolada edited this page Jan 16, 2023
·
2 revisions
UIAutomation is a Microsoft accessibility framework that allows interacting with user-accessible elements (clicking buttons, sending text etc) in a programmatic way. It is the successor to the Acc/MSAA framework. For more detailed information, check out Microsofts documentation for UIA.
- Using an inspect tool (Accessibility Insights, UIAViewer (run UIA.ahk alone), inspect.exe, or AHK v1 UIA tools UIAViewer, UIATreeInspector), inspect your element of interest: a button you want to click, checkbox you want to check etc
- In the inspect tool find a characteristic of the element that you can use to identify it from other elements: this might be a Name, AutomationId, or something else
- Get a starting point element: usually the window element with UIA.ElementFromHandle, root element (desktop) with UIA.GetRootElement, etc
- Use one of the Find methods in combination with the unique characteristic(s) to get your element of interest from the starting point element
- Now you can get information about the element or interact with it
Continue on in this Wiki to find more about UIAutomation tree, elements, patterns, and more.