UI Browser vs. Apple's UIElementInspector
Apple has long offered a free utility—variously called Accessibility Inspector, UI Element Inspector, and UIElementInspector—as part of the Developer Tools installation package. Apple released the latest version, Accessibility Inspector 4.0, as part of Xcode in OS X 10.9 Mavericks. The most recent source code was released on June 3, 2010 as the UIElementInspector 1.4 sample code project, which you can build and install on your computer. The new version has been completely rewritten as a Cocoa application, but its functionality appears to be relatively unchanged since version 1.2.
If Apple's Accessibility Inspector does everything you need, by all means use it. This page offers a few reasons why we think you should use UI Browser, instead.
How are the two applications different?
Short Answer #1: Accessibility Inspector is a bit like the Finder's Get Info window: it is a screen reader that displays information about a single User Interface element at a time, namely, the one currently under the mouse. UI Browser is more like the Finder itself: it is a browser that displays the entire hierarchy of elements, using a familiar multi-column browser view so you can browse from element to element up and down the hierarchy. Both utilities offer additional drawers or windows to display additional information about any UI element.
Short Answer #2: UI Browser includes a Screen Reader with enhanced features, giving you the best of both worlds. Click UI Browser's Switch to Screen Reader button, and a screen reader window fades in while the other UI Browser windows fade out to get out of the Screen Reader's way. Click the Screen Reader's Auto Motive mode button, and the window turns semi-transparent and automatically moves out of the way when you move the mouse over a target application's UI element on the screen. Command-click the Screen Reader's Find in Browser button, and UI Browser's main browser window fades back into view, with the UI element that was under the mouse selected and ready for you to explore. You can set a variety of preferences to refine the Screen Reader's behavior to suit your working habits.
Short Answer #3: UI Browser offers many features that don't exist at all in Accessibility Inspector. For example, UI Browser generates GUI Scripting script statements for you based on your selection of an element and an attribute or action. UI Browser also lets you register to observe notifications as UI elements change. Also, UI Browser lets you explore UI elements that have been "destroyed" in the target application, such as windows that have been closed. And UI Browser lets you try out different parameter values in parameterized attributes.
Short Answer #4: Try them both and see for yourself!
Long Answer: Here are several features that are unique to UI Browser.
- Browse any application's user interface in UI Browser's browser view without switching to the target application and without navigating its actual user interface on the screen.
- Use hot keys to get information about the UI element under the mouse, optionally bringing UI Browser to the front.
- Switch to an enhanced Screen Reader to see all of the actions, attributes, and notifications supported by the UI element currently under the mouse, in real time as you move the mouse around on the screen, and then switch back to the browser view for still more information and to browse additional elements.
- View the selected element's name and AppleScript index number as part of a simplified outline of the target application's containment hierarchy.
- Register for live "notifications" from target applications or specific user interface elements in target applications. Notifications are logged to a separate window in real time as the target application changes state.
- Use specially designed tools to set modifiable properties of a target application's user interface elements from within UI Browser (and optionally receive real-time notifications when they take effect). For example, text areas in a target application can be edited within a UI Browser text window with the full power of Mac OS X text editing: split window, cut and paste, drag and drop, and undo/redo.
- Send keystrokes with virtual modifier keys, for example, to execute the target application's menu items using keyboard shortcuts (and optionally receive real-time notifications when they take effect).
- Use any of UI Browser's windows either as globally floating palettes so they are always available while working with a target application, or as normal windows so that nothing in the target application is hidden when it's brought to the front. Switch between the floating and normal states on the fly by clicking a button!
- View and print a formatted report listing the selected element's path and all of its actions, attributes, and notifications at once to help you write more complicated scripts.
- Saving the best for last: generate AppleScript script statements, with options to put them on the clipboard or send them directly to AppleScript Editor, Script Debugger, or Smile.
This page was first published by PFiddlesoft on May 25, 2010. Last updated November 9, 2013.
Copyright © 2003-2013 Bill Cheeseman. Used by permission. All Rights Reserved.
PFiddlesoft, PFiddle Software, Pfiddle, Pfiddles, and the PFiddlesoft logo are trademarks of PreForm Assistive Technologies, LLC.