Inspect Objects Home
Inspect Objects

Inspect Objects (Inspect) is a Windows Automation-based tool designed for inspecting and testing IAccessible COM interface properties as well as navigating UI elements and controls. Inspect Objects supports both Active Accessibility and UI Automation. Testers can select any item in the user interface and then inspect the item's Accessibility data, for either MSAA or UI Automation.

The Inspect Objects Window

The Inspect Objects window has four major parts:

  • Title bar. Displays the Hwnd for whatever UI item is selected.
  • Menu bar. Provides access to Inspect Objects functionality.
  • Toolbar. Provides access to Inspect Objects functionality.
  • Accessiblity Data. Dipslays all accessibility properties for the selected UI item that the application exposes.

The commands available in the menu bar are also available in the toolbar. Figure 1 shows the Inspect tool querying the Microsoft Active Accessibility properties of the Edit menu element in Notepad.

 

The user interface for the Inspec Objects tool

 

Figure 1: Inspect Objects user interface.

Using Inspect Objects

When you start Inspect Objects, the Data view displays the Accessibility properties for whatever UI element is currently selected. You can navigate the user interface to oview Accessibility information about every element in the UI. By default, Inspect Objects tracks the keyboard or mouse focus. As focus changes, the Data view updates with the property information of the element with focus.

To navigate an application's user interface, you can use any of the following:

  • The mouse
  • The keyboard
  • The navigation options in the Navigation menu
  • The navigation options in the toolbar

The last two options enable you to navigate the tree hierarchy of the uiser interface. The structure of this tree may, of course, differ slightly between UI Automation and MSAA modes.

Verifying Accessibility Property Information

When you launch Inspect Objects, the property information about whatever UI element is currently selected is displayed in the main window. You can configure the tool to show you information about all Accessibility properties or a subset of those properties. You can also specify other viewing options, like whether the tool should remain on top of other uiser interfaces or whether the tool should highlight a bounding rectangle around an element with focus. Once you've configured the tool to work the way you want it to, you can begin navigating your application's UI and viewing property information.

To Configure Property Settings

  1. From the Options menu, select Settings..., or select Show Settings Dialog from the toolbar.
  2. In the Display in Main Window list, select the properties you want displayed in the Data view of Inspect Objects.
  3. In the Display in Information Tooltip list, select the properties you want displayed in a tooltip.
  4. To view properties that the ui element may not support, check the Display unsupported properties box.
  5. Click OK.

To Configure Viewing Options

In the Options menu or in the toolbar, you can select the following viewing options.

When this option is selectedInspect does this
Always on TopAppears on top of any other user interface on the screen.
UI Automation ModeDisplays UI Automation property information.
MSAA ModeDisplays MSAA property information.
Use InvokeDeprecated.
Active Hover ToolbarActivates toolbar buttons on mouse hover, instead of requiring a mouse click.
Don't Beep for Transient ErrorsDoes not perform a system boop when Transient WinEvents occur.
SPI_SCREENREADER FlagAssumes a screen reader is present. This flag indicates that an application should provide information textually instead of graphically. You should not assume this flag is set simply because a screen reader is present.
Show Highlight RectangleHighlights a rectangle around the element with focus.
Show Caret HighlightHighlights the caret.
Show Information TooltipShows property information in a tooltip.
Watch FocusFollows the keyboard focus. When selected, an asynchronous focus event hook is installed and moves the caret to the top left of the element with the focus. This causes Inspect Objects to refresh its properties in about one second.
Watch CaretFollows the caret.
Watch CursorFollows the cursor.
Watch TooltipsFollows the tooltips.

 

Verifying Accessibility Navigation

Once you have selected a UI element using Inspect Objects, you can validate that the element exposes the correct Windows Automation navigation for assistive technolgy products.

To Verify Accessibility Navigation

  1. Open Inspect Objects and the application you want to test.
  2. Select the UI element from which you want to start navigation.
  3. In the Data view, verify that the element exposes the correct navigation-related properties.
  4. From the Navigation menu or the toolbar, select navigation options to navigate the UI, and verify that each element exposes the correct navigation-related properties.

    Note  The navigation options change depending on where the selected element is in the tree.

Interacting with UI Elements

Windows Automation exposes methods that allow assistive technology products to interact with a UI element as if the mouse or keyboard were being used (for example, to click a button). Inspect's Actions enable testers to invoke Windows Automation methods on an element (for example, Default Action calls IAccessible::doDefaultAction).

To Interact with UI Elements

  1. Open Inspect Objects and the application you want to test.
  2. Select the UI element with which you want to interact.
  3. From the Action menu or the toolbar, select the action that corresponds to Windows Automation method you want to invoke.
    ActionDescription
    RefreshRefreshes the user interface.
    Default ActionPerforms the default action for the element.
    FocusSets focus on the element.
    SelectSelects the element.
    Extend SelectionExtends the selection of elements to include all elements between the first selected element and the current element.
    Add to SelectionSelects the current element (such as a list item).
    Remove from SelectionRemoves the current element from the selection.
    SetAccValueSets the MSAA value of the element to the specified string.
    Focused ChildNavigates to the child of the element that currently has focus.
    HitTest at CursorNavigates to the child of the element specified by mouse cursor.
    HitTest...Opens the HitTest dialog.

     

Keyboard Shortcuts

Many of the menu items can be invoked with a keyboard shortcut even when Inspect Objects is not the active application. Note however, that the shortcut keys conflict with some applications.

The following keyboard shortcut keys activate the various options on the menu:

To do thisUse this keyboard shortcut
Invoke the default action of the object under the cursor (Do Default Action).CTRL+SHIFT+F2
Select the object under the cursor (Select).CTRL+SHIFT+F3
Set the keyboard focus to the object under the cursor (Focus).CTRL+SHIFT+F4
Move the cursor to the previous sibling object from the one under the cursor. This command navigates to objects only within a container (Simple Previous).CTRL+SHIFT+F5
Move the cursor to the object's parent (Move to Parent).CTRL+SHIFT+F6
Move the cursor to the first child of the current object (Move to 1st Child).CTRL+SHIFT+F7
Move the cursor to the next sibling object from the one under the cursor. This command navigates to objects only within a container (Simple Next).CTRL+SHIFT+F8
Move to the last child of the current object (Move to Last Child).CTRL+SHIFT+F9
Move the cursor to the previous object from the one under the cursor. This command navigates the object hierarchy (Move to Previous).CTRL+SHIFT+F11
Move the cursor to the next object from the one under the cursor. This command navigates the object hierarchy (Move to Next).CTRL+SHIFT+F12
Change the TTS voice verbosity setting (Voice Verbosity).CTRL+SHIFT+1
Move the cursor to the sibling object to the left of the one the cursor is over (Move Left).CTRL+SHIFT+7
Move the cursor to the sibling object above the object the cursor is over (Move Up).CTRL+SHIFT+8
Move the cursor to the sibling object to the right of the one the cursor is over (Move Right).CTRL+SHIFT+0
Move the cursor to the sibling object below the one the cursor is over (Move Down).CTRL+SHIFT+9

 

Send comments about this topic to Microsoft

Build date: 7/13/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View