UISpy.exe (UI Spy)
The UI Spy tool enables developers and testers to view and interact with the user interface (UI) elements of an application. By viewing the application's UI hierarchical structure, property values, and raised events, developers and testers can verify that the UI they are creating is programmatically accessible to assistive technology devices such as screen readers.
UI Spy uses the UI Automation libraries. UI Automation is the new accessibility framework for Microsoft Windows.
Using UI Spy, developers and testers can check an application's level of accessibility by verifying the following:
UI Automation property values for UI items.
Control pattern implementation.
UI Automation event information.
Navigation and keyboard focus.
UI Spy is installed with the Microsoft Windows SDK. It is located in the \bin folder of the SDK installation path (uispy.exe) or can be accessed from the Start menu (Start\All Programs\Microsoft Windows SDK\Tools\UISpy).
This topic contains the following sections.
- Using UI Spy
- UI Spy Modes
- Command Line Arguments
- Related Topics
Using UI Spy
The following graphic shows the main UI Spy windows. The default windows include the following:
Control View pane, which contains the hierarchical structure of the application's UI items. Other views are Custom, Content, and Raw. When UI Spy is opened, the pane displays the Desktop node and its first-level children nodes.
Properties pane, which displays the property values for the selected UI item.
Output pane, which shows the events and UI Automation exceptions raised by an application.
In Vista, right-click and select Run as administrator when launching UI Spy. This is necessary to ensure UI Spy has access to all UI Automation details from applications running with higher privilege.
UI Spy Modes
UI Spy provides two ways to select a UI item: focus tracking and hover mode. Both methods will select an AutomationElement. Once an item is selected, a rectangle is drawn around the item. The selected item is shown in each of the opened View windows and UI Automation properties for the item are displayed in the Properties window.
Focus Tracking Mode
When you use UI Spy's focus tracking, the tool follows the UI item that has keyboard focus. Common uses for focus tracking include stepping through UI items to ensure that each item can receive keyboard focus.
When you use UI Spy's hover mode, you select a UI item by clicking and holding CTRL for a specific amount of time. To configure the amount of time, on the Edit menu, click Settings. Hover mode is convenient when you want to select a specific UI item.
Command Line Arguments
There are no command line arguments for this tool.