Reputation: 33
Is it possible to invoke iPhone Simulator and launch app through UIAutomation? If so, is it possible to invoke UIAutomation script through shell script or Java?
Or can I able to do this through applescript? Thanks
Upvotes: 1
Views: 467
Reputation: 51
Yes. We use Java to launch Instruments, run ApplesScript that will load a TraceTemplate for the specific Application\Device\Simulator, and then AppleScript to run (Record) a specified JavaScript.
We have implemented a very robust automation framework for testing iOS apps with entirely "dynamic" test scripting. It does not require jailbreaking the device, and it does not require linking any automation support libraries into the application being tested.
This opensource project has working code which also serves as great examples of the Java, AppleScript, and JavaScript required to do these types of things. It is currently coded to support both iOS 4.3.3 and iOS 5.
Upvotes: 1
Reputation: 143
Hey it is possible to do that, using below commands 1.Build using the below command xcodebuild -project myApps.xcodeproj -scheme myApps -configuration Debug -sdk iphonesimulator5.0 clean build
Upvotes: 0
Reputation: 70683
Xcode is Applescriptable. Thus you can run a shell script that runs a compiled AppleScript that runs Xcode and tells it to build and run an iOS app with the Simulator selected, which should start the Simulator and launch the app in the Simulator, if there are no build errors, etc.
Upvotes: 2