UIAutomation on iPad
UIAutomation is only available in iOS 4.0+ SDK – so to run UIAutomation on the iPad make sure your application is compiled to run on 4.x simulator/device. You will need to download the latest version of the SDK to get the 4.x version of the iPad Simulator (also you can upgrade your device firmware to 4.x to run on the device). Download the latest version of the SDK from Apple Dev Center.
Refer to my previous post “Automating iOS User Interface Testing with UIAutomation” for getting started with UIAutomation.
For those of you who are still getting the error like “Automation is not available for this version of the iPhone Simulator.” when trying to run UIAutomation on iPad Simulator – please check the following things:
1. Ensure that you build your application for the correct version of iOS SDK. Select iOS 4.x as Base SDK in the project info before building.
2. Also ensure that the Instruments is running the application on the correct version of iPad Simulator. Select your application in the “Choose Target” and select the correct version of iPad Simulator under “Launch Options” (by default it’s selected to iPad Simulator 3.2, change that to iPad – Simulator – iOS 4.x)
Once you have selected iOS 4.x in Instruments – you should be able to run your UIAutomation scripts on the iPad Simulator.