1

Basically im trying to automate the process of importing data and taking screen shots.

To import data I a feature to do this within my app.

I then need to move through various screens taking screen shots.

I've looked at some automated testing options but these don't seem to do screen shots or modify the ui so screen shots would be affected.

Jules
  • 7,568
  • 14
  • 102
  • 186
  • 2
    Does it have to be in the Simulator? If you can use a device, the UI Automation instrument's `captureScreenWithName()` function can be used within a script to capture screenshots automatically within the various areas of your application. – Brad Larson Apr 25 '12 at 19:34

2 Answers2

6

The best way to take screen shots with the simulator is to just press cmd + s at the right moment. However, there is a better way involving some code: Automate Screenshots on iPhone Simulator? I know that you can automate GUI tests, and it can take screenshots for you. Hope this helped! ^_^

Community
  • 1
  • 1
waylonion
  • 6,866
  • 8
  • 51
  • 92
1

An iOS app built for the Simulator is really running in the Mac OS X environment, and so can call out to run shell scripts, sockets/pipes to/from other processes, etc., including launching an Applescript UI Script poking at the Simulator Menu Items and Save dialogs.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
  • Wouldn't I still have to interact with the simulator to move around in my app ? – Jules Apr 25 '12 at 21:43
  • It's a Mac app. You can add some Mac-only code to your Simulated iOS app to drive the same code your iOS UI drives, but from a socket or pipe or script. etc. – hotpaw2 Apr 25 '12 at 21:54