Sougata Bhattacharya
Sougata Bhattacharya

Reputation: 143

How to run UIAutomation script from command line to Simulator

I have automated my iOS application using UIAutomation, To run this I launch iOS Instruments and run the script. If Same automation script I want to run to the device I use the below command which works as desired

instruments -w -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate myapp -e UIASCRIPT regression.js

But how do I run this from the command line to iOS Simulator ?

Please suggest.

Thanks Sougata

Upvotes: 2

Views: 4531

Answers (2)

idStar
idStar

Reputation: 10794

In Xcode 6.0.1, running with the -w switch and passing in the symbolic name of the simulator appears to now be required (at least that's the only way I got it to work, and I've had others verify and point me to this solution).

See my answer from another post that has an explicit example.

You can also find a bash shell script that will handle invocation for you, automating the resolution of UDID and GUIDs in your simulator app paths.

Upvotes: 0

Brian Yarger
Brian Yarger

Reputation: 1975

If you don't supply the '-w' argument and build your app for the simulator sdk it should launch on the simulator.

Upvotes: 2

Related Questions