Ask a Question

Run Code snippet error

EnservePete
Occasional Contributor

Run Code snippet error

Hi Im having issues with running a code snippet the actual problem is it's erroring for no reason. It actually fires the application up correctly however when it comes to the end of the test it fails due to the reason below.

 

Can anyone help?

 

File name:
C:\Program Files (x86)\Enserve Group Ltd\Job Track Enterprise (FCAMSYS)\Water\JobTrackEnterprise.exe

Possible reasons:

  • You are using Windows Vista or a later Windows version, and TestComplete is running without administrator privileges.
  • The working folder path is unavailable or does not exist:
    [n\a]
  • The command-line arguments specified for the application are invalid:
    [n\a]
  • The specified file is a non-executable file that cannot be launched using the selected Run mode.
10 REPLIES 10
Marsha_R
Champion Level 3

Can we see the code snippet too please?

EnservePete
Occasional Contributor

Here it is

So now we work through the error messages.  

 

Are you running TC as Windows administrator?

 

Can you get to that path  C:\Program Files (x86)\Enserve Group Ltd\Job Track Enterprise (FCAMSYS)\Water\JobTrackEnterprise.exe  just by navigating in Windows?  

 

Can you run that command line from the code snippet from a Run box?  

 

 

EnservePete
Occasional Contributor

So now we work through the error messages.  

 

Are you running TC as Windows administrator? Yes I have tried administrator.

 

Can you get to that path  C:\Program Files (x86)\Enserve Group Ltd\Job Track Enterprise (FCAMSYS)\Water\JobTrackEnterprise.exe  just by navigating in Windows?  Yes

 

Can you run that command line from the code snippet from a Run box?  And Yes just tried this now and it runs.

Try the items listed under Notes at the bottom of this article:

 

http://support.smartbear.com/viewarticle/72627/#KDT

EnservePete
Occasional Contributor

Hi thanks for this I'm not sure this helped unfortunately though.

TanyaYatskovska
SmartBear Alumni (Retired)

Hi Enservepete,

 

Does the issue persist when you run your tested application from:

  1. the TestComplete GUI in the TestedApps Editor?
  2. when using the Run method instead of RunAs in your code?

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Hello I've just tried this I've put my other user details in. I'm not sure what yo mean when saying using the run method instead of RunAs. I've created a new instance of the application and called it other user under RunAs and though TC said it has failed again it actually loads up the application albeit it takes a lot longer than if it was me logging into it.

TanyaYatskovska
SmartBear Alumni (Retired)

Hi Enservepete,

 

Right now, you are using the RunAs method to launch your application. It means that you need to specify the credential information of a user under which account you want to start the application. The Run method is simply run the application under the account under which TestComplete was started.

Try adding your tested application to TestComplete’s TestedApps list as it’s described in the Defining Applications to Test ( http://smartbear.com/viewarticle/68684/ ) article.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: