Skip to main content

User Interface Instrument

·2 mins

The User Interface instrument records the user interaction with your Mac application and lets you replay the recording. This instrument records every event that occurs when you run the application. Choose the UI Recorder template to use the User Interface instrument.

Before You Trace #

User Interface recording requires the Enable access for assistive devices checkbox to be selected in the Universal Access section of Apple’s System Preferences. The System Preferences application should be in your Applications folder.

User Interface Instrument Results #

When you finish a trace with the User Interface instrument, it shows the following information for each event:

  • Sample number.
  • A thumbnail image of where the event happened.
  • Triggers, whose purpose escapes me. For me it always shows an image of a menu with Triggers as the menu choice.
  • The type of event, such as mouse button down, mouse moved, and key down.
  • Key, which tells you the key that was pressed for a keyboard event.
  • Title, which is the title of the view where the event occurred: window, view, control, menu, etc. 
  • Location, which tells you the location of the event. Mouse button events are the most common events to have a location.

Don’t worry if you see lots of samples with blank values in the Key, Title, and Location columns. That’s normal behavior. In the track pane mouse events are blue, keyboard events are green, and system events are yellow.

Replaying what the User Interface Instrument Recorded #

To replay a sequence you recorded, you must first finish a trace by clicking the Stop button. The Record button now has the title Drive and Record. Click the Drive and Record button to replay the recording. Instruments creates a new run and replays the event sequence.