RemoteSession Property

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

Use the OSInfo.RemoteSession property to determine whether TestComplete is running in a remote session.

Declaration

OSInfoObj.RemoteSession

Read-Only Property Boolean
OSInfoObj An expression, variable or parameter that specifies a reference to an OSInfo object

Applies To

The property is applied to the following object:

Property Value

True if TestComplete is running in a remote session, false otherwise.

Example

The following example checks whether TestComplete is running in a remote session.

JavaScript, JScript

function OSInfoSample()
{
  …
  // Obtains the OSInfo object
  var OSInfo = Sys.OSInfo;
  // Checks whether TestComplete is running in a remote session
  if (OSInfo.RemoteSession)
  {
    Log.Message("TestComplete is running in a remote session");
    …
  }
  …

}

Python

def OSInfoSample():
  # ...
  # Obtains the OSInfo object
  OSInfo = Sys.OSInfo
  # Checks whether TestComplete is running in a remote session
  if OSInfo.RemoteSession:
    Log.Message("TestComplete is running in a remote session")
    # ...
  # ...

VBScript

Sub OSInfoSample

  …
  ' Obtains the OSInfo object
  Set OSInfo = Sys.OSInfo
  ' Checks whether TestComplete is running in a remote session
  If OSInfo.RemoteSession Then
    Log.Message "TestComplete is running in a remote session"
    …
  End If
  …

End Sub

DelphiScript

procedure OSInfoSample();
var OSInfo;
begin
  …
  // Obtains the OSInfo object
  OSInfo := Sys.OSInfo;
  // Checks whether TestComplete is running in a remote session
  if OSInfo.RemoteSession then
  begin
    Log.Message('TestComplete is running in a remote session');
    …
  end;
  …

end;

C++Script, C#Script

function OSInfoSample()
{
  …
  // Obtains the OSInfo object
  var OSInfo = Sys["OSInfo"];
  // Checks whether TestComplete is running in a remote session
  if (OSInfo["RemoteSession"])
  {
    Log["Message"]("TestComplete is running in a remote session");
    …
  }
  …

}

See Also

VirtualPC Property
VMWare Property

Highlight search results