Search code examples
iphoneiosios-simulatorrecordingios-ui-automation

Recording User Actions using Instruments


I've tried looking for a while, but is there a way to record user actions on iphones/iphone simulators for testing with Instruments? Mainly I want to be able to target an app and record whatever user input I enter, then have that be able to play back/get data for that. Thanks!


Solution

  • There are 2 options in Instruments:

    1) Use User Interface recorder instrument, that will record mouse move and clicks of the user and allows to replay these. (Unfortunately it seems that Phone Simulator do not expose your app accessibility elements to UI recorder).

    2) Simulate interactions with Automation instrument in javascript using UIA classes - useful for writing interface tests for the app or simulating user interactions. You can read intro about using Automation in this blogpost by Alex Vollmer.