Description
This method is only added to window
objects that correspond to WebBrowser controls that display web pages. It lets you pause the script execution until the page being loaded in the browser is completely loaded and obtain the URL of this page. To delay the script execution until the specified window appears on screen and to get the appropriate window object, use the WaitWindow method.
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
Classic Web Testing
WaitPage Method (Window Objects)
WaitWindow Method
ToUrl Method (Window Objects)
URL Property
Wait For Web Pages