Wait Methods (Web Objects)

Applies to TestComplete 15.64, last modified on May 16, 2024


Parent objects can use the WaitTypeName method to wait for different types of child objects, for example WaitLink, WaitCell, WaitTextNode and so on.

TypeName is the type name of the desired child object (Link, Panel, Table, Cell and so on).


TestObj.WaitTypeName(ObjectNameOrIndex, Timeout)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
ObjectNameOrIndex [in]    Required    String or Integer    
Timeout [in]    Required    Integer    
Result Object

Applies To

The method is applied to the following object:


The method has the following parameters:


Specifies the name of a child object or its index. For instance, if a child object is named Link(2), then the parameter should be 2; if a child object is Panel("MainDIV"), the parameter should be "MainDIV"; if a child object is named Cell(0, 3), the parameter should be 0, 3.


The number of milliseconds to wait until the specified frame becomes available. If Timeout is 0, the method does not wait and returns immediately. If Timeout is -1, the waiting time is infinite.

Result Value

The method returns web objects of the specified type. If the required object is available before the time elapses, the method returns the object. Otherwise, it returns a stub object. To check if the returned objects exist, use the Exists property.


This method is available only if the Tree model of web objects is active (by default).

The Wait method is not displayed in the Object Browser and in the Object Spy window. It can be called from scripts only.


Below are several examples of child object names and Wait methods for them (the Timeout parameter is 1000 ms in all of them):

Object Wait Method
Link(2) WaitLink(2, 1000)
Cell(0, 3) WaitCell(0, 3, 1000)
Panel("MainDiv") WaitPanel("MainDiv", 1000)

See Also

Web Object
Tree Model

Highlight search results