DeviceInfo Property

Applies to TestComplete 14.40, last modified on April 22, 2021

Description

Returns the iOSDeviceInfo object providing detailed information about the given iOS device.

Declaration

iOSDeviceObj.DeviceInfo

Read-Only Property An iOSDeviceInfo 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 iOSDeviceInfo object that contains information about the device (such as the CPU architecture, model number and so on).

Remarks

To obtain information on the connected iOS device, use the iOSDeviceInfo object returned by the DeviceInfo property of the appropriate iOSDevice object.

Example

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

JavaScript, JScript

function GetDeviceInfo()
{
  var DeviceInfoObj = Mobile.Device("iPhone").DeviceInfo;
  Log.Message("Device serial number: " + DeviceInfoObj.SerialNumber);
  Log.Message("Device model number: " + DeviceInfoObj.ModelNumber);
  Log.Message("CPU architecture:" + DeviceInfoObj.CPUArchitecture);
}

Python

def GetDeviceInfo():
   DeviceInfoObj = Mobile.Device("iPhone").DeviceInfo
   Log.Message("Device serial number: " + DeviceInfoObj.SerialNumber)
   Log.Message("Device model number: " + DeviceInfoObj.ModelNumber)
   Log.Message("CPU architecture: " + DeviceInfoObj.CPUArchitecture)

VBScript

Sub GetDeviceInfo
  Set DeviceInfoObj = Mobile.Device("iPhone").DeviceInfo
  Log.Message("Device serial number: " & DeviceInfoObj.SerialNumber)
  Log.Message("Device model number: " & DeviceInfoObj.ModelNumber)
  Log.Message("CPU architecture: " & DeviceInfoObj.CPUArchitecture)
End Sub

DelphiScript

procedure GetDeviceInfo();
var DeviceInfoObj;
begin
   DeviceInfoObj := Mobile.Device('iPhone').DeviceInfo;
   Log.Message('Device serial number: ' + DeviceInfoObj.SerialNumber);
   Log.Message('Device model number: ' + DeviceInfoObj.ModelNumber);
   Log.Message('CPU architecture: ' + DeviceInfoObj.CPUArchitecture);
end;

C++Script, C#Script

function GetDeviceInfo()
{
  var DeviceInfoObj = Mobile["Device"]("iPhone")["DeviceInfo"];
  Log["Message"]("Device serial number: " + DeviceInfoObj["SerialNumber"]);
  Log["Message"]("Device model number: " + DeviceInfoObj["ModelNumber"]);
  Log["Message"]("CPU architecture:" + DeviceInfoObj["CPUArchitecture"]);
}

See Also

iOSDevice Object
iOSDeviceInfo Object
DeviceInfo (Android Testing)
Testing iOS Applications

Highlight search results