iOSOSInfo Object

Applies to TestComplete 15.70, last modified on December 17, 2024
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

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 (Legacy)
OSInfo Property
AndroidOSInfo Object
OSInfo Object

Highlight search results