WaitProcess Method

Applies to TestComplete 14.72, last modified on January 19, 2021

Description

Delays the test execution until the specified process appears in the list of processes running on the given iOS device or until the specified timeout period elapses. If the specified process is found, the method returns the appropriate iOSProcess object. Otherwise, it returns a stub object.

TestComplete recognizes processes of only those applications that were prepared for testing in a special way.

Also, note that in order for TestComplete to be able to access an iOS device connected to your computer, you need to prepare your computer and TestComplete for testing. For more information, see Preparing Applications, Devices, and Test Computers for iOS Testing.

Declaration

iOSDeviceObj.WaitProcess(ProcessNameTimeout)

iOSDeviceObj An expression, variable or parameter that specifies a reference to an iOSDevice object
ProcessName [in]    Required    String    
Timeout [in]    Optional    Integer Default value: 0   
Result The iOSProcess object

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

ProcessName

Specifies the name of the desired process, that is, the name of the application running on the device (for example, Orders).

Timeout

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.

Result Value

The iOSProcess object. If the specified object does not exist, the method returns an empty stub object.

Remarks

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 will cause an error.

See Also

iOSDevice Object
iOSProcess Object
Process Method
WaitProcess Method (Android Testing)
Testing iOS Applications

Highlight search results