DeviceInfo Property

Applies to TestComplete 15.69, last modified on November 13, 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

Returns AndroidDeviceInfo object providing detailed information about the given Android device.

Declaration

AndroidDeviceObj.DeviceInfo

Read-Only Property A AndroidDeviceInfo 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 AndroidDeviceInfo object that contains information about the device (such as the CPU type, model name, manufacturer and so on).

Remarks

To obtain information on a connected Android device, use the DeviceInfo property of the appropriate AndroidDevice object.

Example

The code below gets the AndroidDeviceInfo object and posts the value of some of its properties to the test tog:

JavaScript, JScript

function GetDeviceInfo()
{
  var DeviceInfoObj = Mobile.Device("MyDevice").DeviceInfo;
  Log.Message("Device model: " + DeviceInfoObj.Model);
  Log.Message("CPU type:" + DeviceInfoObj.CPU_ABI);
}

Python

def GetDeviceInfo():
   DeviceInfoObj = Mobile.Device("MyDevice").DeviceInfo
   Log.Message("Device model: " + DeviceInfoObj.Model)
   Log.Message("CPU type: " + DeviceInfoObj.CPU_ABI)

VBScript

Sub GetDeviceInfo
  Set DeviceInfoObj = Mobile.Device("MyDevice").DeviceInfo
  Log.Message("Device model: " & DeviceInfoObj.Model)
  Log.Message("CPU type: " & DeviceInfoObj.CPU_ABI)
End Sub

DelphiScript

procedure GetDeviceInfo();
var DeviceInfoObj;
begin
   DeviceInfoObj := Mobile.Device('MyDevice').DeviceInfo;
   Log.Message('Device model: ' + DeviceInfoObj.Model);
   Log.Message('CPU type: ' + DeviceInfoObj.CPU_ABI);
end;

C++Script, C#Script

function GetDeviceInfo()
{
  var DeviceInfoObj = Mobile["Device"]("MyDevice")["DeviceInfo"];
  Log["Message"]("Device model: " + DeviceInfoObj["Model"]);
  Log["Message"]("CPU type:" + DeviceInfoObj["CPU_ABI"]);
}

See Also

AndroidDevice Object
AndroidDeviceInfo Object
DeviceInfo Property (iOS Testing)
Testing Android Applications (Legacy)

Highlight search results