WaitFrame Method (Web Objects)

Applies to TestComplete 15.69, last modified on November 13, 2024
This method is obsolete. By default, it is not available. See the Remarks section below.

Description

The WaitFrame method is used to pause the script execution until the specified frame becomes available or until the specified timeout is over.

Declaration

TestObj.WaitFrame(SourceIndex, Timeout)

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

Applies To

The method is applied to the following object:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameters:

SourceIndex

Specifies the value used to address the frame.

A frame can be addressed by its id, sourceIndex properties (for Web page elements, these properties hold the same value) or by the frame’s name. The frame’s name is the value of the frame’s Name or ID attributes. You can obtain it using the NativeWebObject.name property of the program object corresponding to the frame. It is also the value of the string specified in the parenthesis of the frame’s node name, which you can see in the Object tree of the Object Browser.

To specify the frame’s name, you can use the asterisk (*) and question mark (?) wildcards. The asterisk corresponds to a string of any length, the question mark corresponds to any single character.

Timeout

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

A program object that corresponds to the specified frame.

If the specified frame does not exist, the method returns a stub object. To determine whether the method returns the object corresponding to an existing frame, check the Exists property of the returned object. If Exists returns False, the page does not contain the specified frame.

Remarks

This method is obsolete. It is supported for the backward compatibility only. It is available only if one of the obsolete Tree models is enabled.

See Also

Frame Method (Web Objects)
Web Object
Classic Web Testing

Highlight search results