dotNET Property

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

The AppDomain.dotNET property provides access to .NET namespaces, classes and static class members defined in assemblies that are loaded into the given application domain.

Declaration

TestObj.dotNET

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 whose properties are the names of .NET namespaces available in the application domain. Dots in namespace names are replaced with underscores, so, for example, the System.Collections namespace is accessible as System_Collections.

Each namespace object, in its turn, contains properties that are names of classes in this namespace. Objects corresponding to classes have properties and methods that are declared as static in these classes.

This way, you can access a specific static class member using the following syntax:

Sys.Process("MyApp").AppDomain("MyApp.exe").dotNET.namespace_name.class_name.property_name

Sys.Process("MyApp").AppDomain("MyApp.exe").dotNET.namespace_name.class_name.method_name(parameter1, parameter2, ...)

Remarks

To learn which .NET namespaces and classes are available in an application domain, you can explore the AppDomain.dotNET object in the Object Browser.

.NET namespaces available in an application domain

Click the image to enlarge it.

Example

For examples of using the AppDomain.dotNET property to work with .NET classes available in an application domain, see the following topics:

See also Calling Functions From .NET Assemblies.

See Also

AppDomain Object
Accessing Non-Visual Objects in .NET Applications
Creating Instances of .NET Classes Defined in Applications
Calling Functions From .NET Assemblies

Highlight search results