HttpWatch Automation Reference - Version 15.x
HttpWatch Namespace / Controller Class / WaitEx Method
A reference to a Plugin object in which the page is being loaded.

The number of seconds to wait for the current web page to finish loading or a value of -1 to specify an infinite timeout.

Values between 0 and httpIdleSecs are not valid and will cause WaitEx to return an error. If you supplied a value equal to or less than httpIdleSecs, a timeout would always occur during the first wait after loading a page.

Set to true to wait until the Page Load event is detected.

Set to true to wait until the Render Start event is detected.

The Render Start event may not be detected if the browser window is not visible.

The number of seconds of HTTP inactivity required, e.g. the value of 5 would indicate that no HTTP request should have been executing for 5 seconds for the wait condition to be satisfied.

Use -1 to indicate that no HTTP inactivity is required.


In This Topic
    WaitEx Method
    In This Topic
    This method provides a finer level of control than the Wait method as it will wait for a page to reach a given state.
    Syntax
    'Declaration
     
    Public Function WaitEx( _
       ByVal plugin As Plugin, _
       ByVal timeOutSecs As Integer, _
       ByVal waitForPageLoadEvent As Boolean, _
       ByVal waitForRenderStartEvent As Boolean, _
       ByVal httpIdleSecs As Integer _
    ) As Boolean

    Parameters

    plugin
    A reference to a Plugin object in which the page is being loaded.
    timeOutSecs

    The number of seconds to wait for the current web page to finish loading or a value of -1 to specify an infinite timeout.

    Values between 0 and httpIdleSecs are not valid and will cause WaitEx to return an error. If you supplied a value equal to or less than httpIdleSecs, a timeout would always occur during the first wait after loading a page.

    waitForPageLoadEvent
    Set to true to wait until the Page Load event is detected.
    waitForRenderStartEvent

    Set to true to wait until the Render Start event is detected.

    The Render Start event may not be detected if the browser window is not visible.
    httpIdleSecs

    The number of seconds of HTTP inactivity required, e.g. the value of 5 would indicate that no HTTP request should have been executing for 5 seconds for the wait condition to be satisfied.

    Use -1 to indicate that no HTTP inactivity is required.

    Return Value

    Returns true if the page reached the required state during the specified timeout period and false if loading had not completed by the end of the timeout.
    Remarks

    The Wait method is the equivalent of calling the WaitEx method with the following parameters:

     

    Wait/WaitEx methods
    Copy Code
    // Calling WaitEx with waitForPageLoadEvent set to true
    // and a 5 second value for httpIdleSecs
    controller.WaitEx( plugin, myTimeOutValue, true, false, 5);
    
    // Is the equivalent to calling Wait
    controller.Wait(plugin, myTimeOutValue);
    

     WaitEx can only be used if Record has been called on the Plugin object.

    Requirements
      
    See Also