WaitConfirm Method (Page Objects)

Applies to TestComplete 15.0, last modified on November 17, 2021

Description

Use the WaitConfirm method to delay the test run until a tested web page shows a message box. To learn more, see Handle JavaScript Popups and Browser Dialogs.

Declaration

TestObj.WaitConfirm(Timeout)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Timeout [in]    Required    Integer    
Result A Confirm 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 parameter:

Timeout

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

Result Value

The Confirm object that corresponds to a message box that the web page is showing.

If the page is not showing any message boxes, the method will return a stub object. To determine whether the method returns a valid object, use the Exists property of the returned object. If the property returns False, the object is a stub object.

See Also

Confirm Method (Page Objects)
Handle JavaScript Popups and Browser Dialogs

Highlight search results