iOSOSInfo Object

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

Description

The iOSOSInfo object provides information about the operating system installed on the given iOS device. The object contains the following properties:

Note: All the properties are read-only and return a string value.
Property Description
BuildVersion The operating system's build version.
FirmwareVersion The firmware version number.
ProductVersion The operating system's version number.

Example

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

JavaScript, JScript

function GetOSInfoObj()
{
  var OSInfoObj = Mobile.Device("MyDevice").OSInfo;
  Log.Message("OS version: " + OSInfoObj.ProductVersion);
  Log.Message("Firmware version:" + OSInfoObj.FirmwareVersion);
}

Python

def GetOSInfoObj():
  OSInfoObj = Mobile.Device("MyDevice").OSInfo
  Log.Message("OS version: " + OSInfoObj.ProductVersion)
  Log.Message("Firmware version: " + OSInfoObj.FirmwareVersion)

VBScript

Sub GetOSInfo
  Set OSInfoObj = Mobile.Device("MyDevice").OSInfo
  Log.Message("OS version: " & OSInfoObj.ProductVersion)
  Log.Message("Firmware version: " & OSInfoObj.FirmwareVersion)
End Sub

DelphiScript

procedure GetOSInfoObj();
var OSInfoObj;
begin
   OSInfoObj := Mobile.Device('MyDevice').OSInfo;
   Log.Message('OS version: ' + OSInfoObj.ProductVersion);
   Log.Message('Firmware version: ' + OSInfoObj.FirmwareVersion);
end;

C++Script, C#Script

function GetOSInfoObj()
{
  var OSInfoObj = Mobile["Device"]("MyDevice")["OSInfo"];
  Log["Message"]("OS version: " + OSInfoObj["ProductVersion"]);
  Log["Message"]("Firmware version:" + OSInfoObj["FirmwareVersion"]);
}

See Also

Testing iOS Applications
OSInfo Property
AndroidOSInfo Object
OSInfo Object

Highlight search results