Matthew van Boheemen
Matthew van Boheemen

Reputation: 1335

Automated Testing performTaskWithPathArgumentsTimeout doesn't work from command line ?

Im writing automated tests for iOS using UIAutomation. In my setup code (javascript) I use the performTaskWithPathArgumentsTimeout method to call the "curl" command to hit a URL.

target.host().performTaskWithPathArgumentsTimeout("usr/bin/curl", ["http://TEST123/iPhoneTestSupport/Data/RemoveAllData"], 30);

This works fine in the tests when I run the tests manually through the Instruments UI, however this doesn't work when I run the tests through the Instruments command line. The error I get is "launch path not accessible". The user running through the command line as the same one as through the UI.

Any help would be appreciated. Thanks

Upvotes: 1

Views: 620

Answers (1)

Matthew van Boheemen
Matthew van Boheemen

Reputation: 1335

I was missing the starting forward slash from the path. This was causing the error. I changed it to the code below and this resolved the issue.

target.host().performTaskWithPathArgumentsTimeout("/usr/bin/curl", ["http://TEST123/iPhoneTestSupport/Data/RemoveAllData"], 30);

Upvotes: 1

Related Questions