Applies to TestComplete 14.70, last modified on October 20, 2020


The AppDomain object provides access to .NET application domains that exist within an application process. It also allows you to access namespaces, classes and class members in assemblies loaded into the corresponding domain.

You can access the AppDomain object in one of the following ways:

  • As a child object of a process object addressed either as AppDomain(FriendlyName, [ClrVersion]) or using the WaitAppDomain method.

  • Using the ClrAppDomain property of a window, control or object in a .NET application.

The TestComplete AppDomain object is a wrapper over .NET Framework’s AppDomain object. That is, besides properties provided by TestComplete, it contains native methods and properties of the .NET AppDomain object. For more information on them, see the AppDomain Class article in the MSDN library.



The following example demonstrates how to determine the .NET runtime version used by a .NET application:

JavaScript, JScript

function Test()
  var strVer = Sys.Process("Orders").AppDomain("Orders.exe").ClrVersion;


def Test():
  strVer = Sys.Process("Orders").AppDomain("Orders.exe").ClrVersion


Sub Test
  Dim strVer
  strVer = Sys.Process("Orders").AppDomain("Orders.exe").ClrVersion
  Log.Message strVer
End Sub


procedure Test;
var strVer;
  strVer := Sys.Process('Orders').AppDomain('Orders.exe').ClrVersion;

C++Script, C#Script

function Test()
  var strVer = Sys["Process"]("Orders")["AppDomain"]("Orders.exe")["ClrVersion"];

See Also

AppDomain Method
ClrAppDomain Property
Accessing Native Properties and Methods of .NET Objects
Accessing Non-Visual Objects in .NET Applications
Creating Instances of .NET Classes Defined in Applications
Testing .NET Applications
Testing WPF Applications

Highlight search results