Reputation: 47
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!
Upvotes: 4
Views: 4479
Reputation: 4791
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.
Upvotes: 2
Reputation: 3628
As Roger said, you're going to have to use the UIAutomation framework. Apple's documentation should get you where you need to go. Also, take a look at this.
You have to write the automation in JavaScript. Annoying, I know, but with enough examples in front of you you should be able to pick it up in under an hour.
Upvotes: 0
Reputation: 15813
FoneMonkey is a promising third party solution, I had that working on a recent project and whilst it wasn't perfect, it does let you record user actions, play them back and so forth. Plus it seems to be open source so you can extend it yourself if required.
There is also the UIAutomation framework in iOS but I have no direct experience with it.
Upvotes: 0