Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:42:00+00:00 2026-06-03T20:42:00+00:00

I am automating some test cases for an iPhone app and I am using

  • 0

I am automating some test cases for an iPhone app and I am using the UIAutomation class. I want to use the function performTaskWithPathArgumentsTimeout, which I believe runs some external script. But I cant use it. I have the following code:

#import "revision3.js"
#import "tuneup/tuneup.js"
test("script call", function(target, app){
var target = UIATarget.localTarget();
var host = target.host();
var result = host.performTaskWithPathArgumentsTimeout("fwasim/Desktop/registration.js, ["null"], 5);

UIALogger.logDebug("exitCode: " + result.exitCode);
UIALogger.logDebug("stdout: " + result.stdout);
UIALogger.logDebug("stderr: " + result.stderr);
});

The instrument console says:

Error: launch path not accessible.

I have searched on the internet but there seems to be very scarce resources on UIAutomation class and more specifically on the above function. Can anyone tell me what I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:42:01+00:00Added an answer on June 3, 2026 at 8:42 pm

    The performTaskWithPathArgumentsTimeout() method on the host is for executing shell programs not JavaScript. That error message is telling you that it can’t find an executable command at the path you gave.

    Here’s how you could execute a command with that method:

    var result = host.performTaskWithPathArgumentsTimeout("/usr/bin/whoami", [], 5);
    

    That executes the whoami command that lives in the /usr/bin directory. That command just prints out the logged in username which you can get at with result.stdout as you’re already using.

    I’m not quite sure what you’re trying to do here, though. From the looks of the script you were trying to execute (fwasim/Desktop/registration.js), are you just trying to run some registration tests that are in a different file? If so, there’s an easier way to do that. Just type this:

    #import "fwasim/Desktop/registration.js"
    

    That tries to import that JavaScript file as if it was relative to the directory of the script file that is running. You’d only need performTaskWithPathArgumentsTimeout() if you’re trying to execute an external shell script or something like that. It’s not for executing JavaScript inside UI Automation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm automating UI tests to my Silverlight App and I'm using Visual Studio 2010
I have some NUnit tests which uses a TestCaseSource function. Unfortunately, the TestCaseSource function
I'm writing some Android test automation for our applications, which are localized into 18
In the process of automating some code, I am looking to call upon a
I have a web app (MVC) where I need some automatic service to run
I am trying to use some Word 2007 automation where we give the user
I have some logic that test if an object is nil or not, how
I'm using PowerShell scripts for some UI automation of a WPF application. Normally, the
I am testing an extjs web app by using robotframework and selenium2library, but I
In my test automation practice I always use a gui mapping strategy that reduces

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.