Forum Discussion

roli62's avatar
roli62
Occasional Contributor
4 hours ago

How to wait for TestedApp to Finish and get Exit Code

I have a tested app called "python".

Application path: C:\Python312\python.exe

Command-line parameters: C:\Users\jondoe\Documents\iNext\main.py

The testedApp is called in a python function, which works well:

def runTestAppPython():
  
  myApp = TestedApps.python
  pyProcess = myApp.Run()


What needs to be done to make the function wait for myProcess to finish.

And how can I access the exit value of the testedApp in this function. 

What I tried was 

  1. pyProcess.Wait() to wait for the testedApp to finish, but does not work.
  2. pyProcess.ExitCode to get the exit value of the testedApp, but does not work, too.

Help is very appreciated.

Thank you.