I have to automate the testing for an iOS Simulator application using Applescript. I know that iOS Simulator is not a scriptable application, so i would like to know if Applescript can identify any information about a running application in the Simulator (i.e. Buttons of the menu – the application is not a flash one).
Thank you in advance.
If you want to perform automated testing of your iPhone application in the Simulator or on the device, I highly recommend using the new UI Automation instrument that came with the 4.0 SDK. It lets you create Javascript scripts that interact with the buttons and other accessibility items in your application’s interface. It can test for correct operation of your interface, take screenshots (when running on the device), and be paired with other instruments for performance profiling.
I highly recommend watching the WWDC 2010 session video 306 – “Automating User Interface Testing with Instruments”.
I also walk through how to use this tool in the “Testing” session of my fall semester Advanced iPhone Development course on iTunes U (that link isn’t redirectly correctly right now, so just do a search in the iTunes Store for “advanced iphone development”). I have a sample set of scripts here that can be run against Apple’s UICatalog sample application to show off how this works.