VirtualPC Property

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

Description

Use the OSInfo.VirtualPC property to determine whether the operating system on which TestComplete is running, works on a Virtual PC virtual machine.

Declaration

OSInfoObj.VirtualPC

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 on a Virtual PC virtual machine; otherwise False.

Example

The following example checks whether the operating system is running on a Virtual PC virtual machine.

JavaScript, JScript

function OSInfoSample()
{
  // Obtains the OSInfo object
  var OSInfo = Sys.OSInfo;
  // Checks whether the operating system is running on a Virtual PC virtual machine
  if (OSInfo.VirtualPC)
    Log.Message("The operating system is running on a Virtual PC virtual machine");
}

Python

def OSInfoSample():
  # Obtains the OSInfo object
  OSInfo = Sys.OSInfo
  # Checks whether the operating system is running on a Virtual PC virtual machine
  if OSInfo.VirtualPC:
    Log.Message("The operating system is running on a Virtual PC virtual machine")

VBScript

Sub OSInfoSample

  ' Obtains the OSInfo object
  Set OSInfo = Sys.OSInfo
  ' Checks whether the operating system is running on a Virtual PC virtual machine
  If OSInfo.VirtualPC Then
    Log.Message "The operating system is running on a Virtual PC virtual machine"
  End If

End Sub

DelphiScript

procedure OSInfoSample();
var OSInfo, Dir;
begin
  // Obtains the OSInfo object
  OSInfo := Sys.OSInfo;
  // Checks whether the operating system is running on a Virtual PC virtual machine
  if OSInfo.VirtualPC then
    Log.Message('The operating system is running on a Virtual PC virtual machine');
end;

C++Script, C#Script

function OSInfoSample()
{
  // Obtains the OSInfo object
  var OSInfo = Sys["OSInfo"];
  // Checks whether the operating system is running on a Virtual PC virtual machine
  if (OSInfo["VirtualPC"])
    Log["Message"]("The operating system is running on a Virtual PC virtual machine");
}

See Also

VMWare Property
RemoteSession Property

Highlight search results