OSInfo Property

Applies to TestComplete 15.47, last modified on January 20, 2023
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 AndroidOSInfo object that provides information about the operating system installed on the given Android device.

Declaration

AndroidDeviceObj.OSInfo

Read-Only Property An AndroidOSInfo object
AndroidDeviceObj An expression, variable or parameter that specifies a reference to an AndroidDevice object

Applies To

The property is applied to the following object:

Property Value

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

Remarks

To obtain information on the operating system installed on an iOS device connected to your computer, use the OSInfo property of the appropriate iOSDevice object.

Example

The following code gets the AndroidOSInfo object and posts the value of several its properties to the test log:

JavaScript, JScript

function GetOSInfoObj()
{
  var OSInfoObj = Mobile.Device("MyDevice").OSInfo;
  Log.Message("Brand: " + OSInfoObj.Brand);
  Log.Message("ID: " + OSInfoObj.ID);
  Log.Message("Release version:" + OSInfoObj.VersionRelease);
}

Python

def GetOSInfoObj():
   OSInfoObj = Mobile.Device("MyDevice").OSInfo
   Log.Message("Brand: " + OSInfoObj.Brand)
   Log.Message("ID: " + OSInfoObj.ID)
   Log.Message("Release version: " + OSInfoObj.VersionRelease)

VBScript

Sub GetOSInfo
  Set OSInfoObj = Mobile.Device("MyDevice").OSInfo
  Log.Message("Brand: " & OSInfoObj.Brand)
  Log.Message("ID: " & OSInfoObj.ID)
  Log.Message("Release version: " & OSInfoObj.VersionRelease)
End Sub

DelphiScript

procedure GetOSInfoObj();
var OSInfoObj;
begin
   OSInfoObj := Mobile.Device('MyDevice').OSInfo;
   Log.Message('Brand: ' + OSInfoObj.Brand);
   Log.Message('ID: ' + OSInfoObj.ID);
   Log.Message('Release version: ' + OSInfoObj.VersionRelease);
end;

C++Script, C#Script

function GetOSInfoObj()
{
  var OSInfoObj = Mobile["Device"]("MyDevice")["OSInfo"];
  Log["Message"]("Brand: " + OSInfoObj["Brand"]);
  Log["Message"]("ID: " + OSInfoObj["ID"]);
  Log["Message"]("Release version:" + OSInfoObj["VersionRelease"]);
}

See Also

AndroidOSInfo Object
AndroidDevice Object
OSInfo Property (iOS Testing)
Testing Android Applications (Legacy)

Highlight search results