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

Description

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.

Members

Example

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;
  Log.Message(strVer);
}

Python

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

VBScript

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

DelphiScript

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

C++Script, C#Script

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

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