WaitSlApplication Method (Web and XUL Objects)

Applies to TestComplete 14.80, last modified on April 13, 2021

Description

The WaitSlApplication method delays the script execution until an SlApplication object of a child Silverlight application (if any) becomes accessible or until the specified time limit is reached. If the method obtains access to the child SlApplication object, the method returns this object.

Declaration

TestObj.WaitSlApplication(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 Object

Applies To

The method is applied to all web and XUL test objects.

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 SlApplication object becomes available. If Timeout is 0, the method returns immediately. If Timeout is -1, the waiting time is infinite.

Note that Timeout value is not strict and if the tested application is busy, TestComplete could wait for the object for a longer period of time than it is specified by the parameter.

Result Value

The method returns an SlApplication object of a Silverlight Application that is a child of the current web object. The returned SlApplication object is a wrapper to the Silverlight application’s main class that encapsulates application-specific functionality and inherits from the System.Windows.Application class. If the web object does not contain a child Silverlight application or the specified time limit is reached, the method returns an empty stub object.

Remarks

The WaitSlApplication method is available only if the Silverlight Application Support and Web Testing plugins are installed. Otherwise, the method is absent in the method list of the TestObj object.

See Also

SlApplication Object
SlApplication Method (Web and XUL Objects)
Testing Silverlight Applications - Overview
Addressing Objects of In-Browser Silverlight Applications

Highlight search results