Applies to TestComplete 14.10, last modified on May 13, 2019


Delays script execution until the specified process appears in the list of processes or the specified time limit is reached. To determine whether the returned object is an extant process, call Exists.

WaitProcess does not launch the process. It simply waits for it for a maximum of Timeout milliseconds.



ProcessName [in]    Required    String    
Timeout [in]    Optional    Integer Default value: 0   
ProcessIndex [in]    Optional    Integer Default value: 1   
Result The Process object

Applies To

The method is applied to the following object:



The method has the following parameters:


The name of the executable file that launched the process.


Milliseconds to delay the script execution in order to allow the process to start. If Timeout is 0, the method searches for the desired process once and then returns immediately. If Timeout is -1, the waiting time is infinite.


The index of the process instance among those started by the same executable. The first process has index 1, the second - 2, etc. 1 is the default value. If you obtain several processes with the same name and the process with the lowest index is terminated, the indexes of other processes will be decreased by one.

Result Value

The Process object with the specified name. If the specified object does not exist, the method returns an empty stub object.


Unlike the Process method, WaitProcess does not post an error message to the log if the desired process does not exist. It simply returns an empty stub object. Use the Exists property of the returned object to determine whether the desired window exists in the system. If the process exists, its Exists property will return True; the property of the stub object will return False. Note that calling any method of the stub object, except for WaitWindow, will cause an error.


To view an example that demonstrates how to use the WaitProcess method, see Checking Whether an Object Exists.

See Also

Process Method
Process Object
ProcessName Property
Index Property (Process and Browser Objects)

Highlight search results