Wait Method

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

This method is only added to window objects that correspond to WebBrowser controls and to Firefox’s window that display web pages. It lets you pause the script execution until the page being loaded in the browser is completely loaded.

If a user presses the Stop button in the browser while the Window.Wait method is running, the script execution will not resume. As a result, the script run will need to be interrupted.

Declaration

TestObj.Wait()

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Result String

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.

Result Value

The Wait method returns the URL of the page or resource that was loaded last on the page. If the web page does not contain frames and the page was loaded successfully, the Wait method returns the page’s URL. If the page contains frames, the method will return the URL of the last page that was loaded in the frame. If the load was not successful, the method returns an empty string.

Remarks

The Wait method is only added to window objects corresponding to WebBrowser controls and to Firefox’s window that display web pages. It is an analogue of the Page.Wait method. However, it lets you wait for a web page without having to obtain the Page object that provides access to the page.

See Also

Testing Web Applications
WaitPage Method (Window Objects)
Wait Method
ToUrl Method (Window Objects)
URL Property
Waiting For Web Pages

Highlight search results