SlClasses Property (SlApplication Objects)

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

This property provides access to namespaces and classes defined within assemblies that are included in the tested Silverlight application package (that is, in the .xap file in which the application is implemented). Using this property, you can access the application’s static objects, their public members and even create class instances directly from your script code by calling constructors of the needed classes.

Declaration

TestObj.SlClasses

Read-Only Property Object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

An object that provides access to a collection of namespaces defined in the application’s assemblies. Each property of this object is associated with a namespace. Using these object properties, you can get access to classes defined in the corresponding namespaces. If the name of a namespace contains dots ("."), TestComplete replaces them with underscores in the name of the corresponding property of the object returned by the SlClasses property (for instance, the System_Windows_Controls property of the object returned by SlClasses corresponds to the System.Windows.Controls namespace).

Remarks

The property is available only if the Silverlight Application Support plugin is installed.

Example

To view an example that demonstrates how to use the SlClasses property, see Addressing Objects of In-Browser Silverlight Applications.

See Also

SlApplication Object

Highlight search results