RunRoutineEx method to command TestComplete to execute the specified script routine. The method does not pause the program execution until the execution of the specified script routine is over. If the method cannot initiate the routine execution, an error occurs. You can handle it using the means of the scripting language you use (see Handling Exceptions in Scripts).
IntegrationObj.RunRoutineEx(ProjectName, UnitName, RoutineName, Parameters)
|IntegrationObj||An expression, variable or parameter that specifies a reference to an Integration object|
The method is applied to the following object:
The method has the following parameters:
Specifies the name of the project where the desired routine belongs.
Specifies the name of the script unit containing the desired routine.
Specifies the name of the desired script routine.
Specifies a Variant-compatible array of the values to be passed to the called script routine as parameters.
Call this method only if TestComplete is not running any tests, else, an error will occur. To check whether TestComplete is running tests, use the
RunRoutineExmethod does not pause the program’s execution until the routine's execution is over. To wait until the routine’s execution finishes, you can call the
IsRunningproperty in a loop. See Working With TestComplete via COM - Overview for more information.
To obtain the value of the called script routine, use
RoutineResultproperty after the script run is over.
If your C# code is sending custom objects as parameters to the
RunRoutineExmethod, the assembly should be configured to make the objects visible to COM (in other words, its Make assembly COM-Visible property must be enabled).
For an example of how to use the
RunRoutine method, see the Calling Script Routines via COM topic.
Working With TestComplete via COM - Overview
Calling Script Routines via COM