|The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For new mobile tests, we recommend using the newer cloud-compatible approach.
Delays the test execution until the specified process appears in the list of processes running on the given Android device or until the specified timeout period elapses. If the specified process is found, the method returns the appropriate
AndroidProcess object. Otherwise, it returns a stub object.
|TestComplete recognizes processes of only those applications that were prepared for testing in a special way. For more information, see Preparing Android Applications (Legacy).
|An expression, variable or parameter that specifies a reference to an AndroidDevice object
|Default value: 0
|The AndroidProcess object
The method is applied to the following object:
The method has the following parameters:
Specifies the name of the desired process, that is, the full name of the corresponding package (for example, com.example.orders).
The number of milliseconds to delay the script execution in order to allow the package 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 AndroidProcess object. If the specified object does not exist, the method returns an empty stub object.
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 will cause an error.
To view an example that demonstrates how to use the
WaitProcess method, see Waiting for Objects in Android Open Applications (Legacy).