OSInfo Property

Applies to TestComplete 14.92, last modified on September 16, 2021
The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For new mobile tests, we recommend using the newer cloud-compatible approach.

Description

Returns an iOSOSInfo object that provides information about the operating system installed on the given iOS device.

Note: To obtain information on the operating system installed on an Android device connected to your computer, use the OSInfo property of the appropriate AndroidDevice object.

Declaration

iOSDeviceObj.OSInfo

Read-Only Property An iOSOSInfo object
iOSDeviceObj An expression, variable or parameter that specifies a reference to an iOSDevice object

Applies To

The property is applied to the following object:

Property Value

The iOSOSInfo object that contains information about the device's operating system.

Example

The following code gets the iOSOSInfo object and posts its properties to the test log:

JavaScript, JScript

function GetOSInfoObj()
{
  var infoObj = Mobile.Device("iPhone").OSInfo;
  Log.Message("Build version: " + infoObj.BuildVersion);
  Log.Message("Firmware version: " + infoObj.FirmwareVersion);
  Log.Message("Product version:" + infoObj.ProductVersion);
}

Python

def GetOSInfoObj():
  infoObj = Mobile.Device("iPhone").OSInfo
  Log.Message("Build version: " + OSInfoObj.BuildVersion)
  Log.Message("Firmware version: " + infoObj.FirmwareVersion)
  Log.Message("Product version: " + infoObj.ProductVersion)

VBScript

Sub GetOSInfo
  Set infoObj = Mobile.Device("iPhone").OSInfo
  Log.Message("Build version: " & infoObj.BuildVersion)
  Log.Message("Firmware version: " & infoObj.FirmwareVersion)
  Log.Message("Product version: " & infoObj.ProductVersion)
End Sub

DelphiScript

procedure GetOSInfoObj();
var infoObj;
begin
   infoObj := Mobile.Device('iPhone').OSInfo;
   Log.Message('Build version: ' + OSInfoObj.BuildVersion);
   Log.Message('Firmware version: ' + infoObj.FirmwareVersion);
   Log.Message('Product version: ' + infoObj.ProductVersion);
end;

C++Script, C#Script

function GetOSInfoObj()
{
  var infoObj = Mobile["Device"]("iPhone")["OSInfo"];
  Log["Message"]("Build version: " + infoObj["BuildVersion"]);
  Log["Message"]("Firmware version: " + infoObj["FirmwareVersion"]);
  Log["Message"]("Product version:" + infoObj["ProductVersion"]);
}

See Also

iOSDevice Object
iOSOSInfo Object
OSInfo Property (Android Testing)
Testing iOS Applications (Legacy)

Highlight search results