VMWare Property

Applies to TestComplete 14.72, last modified on December 24, 2020

Description

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

Declaration

OSInfoObj.VMWare

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 VMWare virtual machine. False otherwise.

Example

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

JavaScript, JScript

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

Python

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

VBScript

Sub OSInfoSample

  ' Obtains the OSInfo object
  Set OSInfo = Sys.OSInfo
  ' Checks whether the operating system is running on a VMWare virtual machine
  If OSInfo.VMWare Then
    Log.Message "The operating system is running on a VMWare 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 VMWare virtual machine
  if OSInfo.VMWare then
    Log.Message('The operating system is running on a VMWare 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 VMWare virtual machine
  if (OSInfo["VMWare"])
    Log["Message"]("The operating system is running on a VMWare virtual machine");
}

See Also

VirtualPC Property
RemoteSession Property

Highlight search results