OSType Property

Applies to TestComplete 15.62, last modified on March 14, 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

Specifies whether the device runs iOS or Android.

Declaration

ProgObj.OSType

Read-Only Property String
ProgObj An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

Property Value

A string that can have the following values:

  • iOS
  • Android

Example

The code posts the value of the OSType property to the test log:

JavaScript, JScript

Log.Message(Mobile.Device("MyDevice").OSType);

Python

Log.Message(Mobile.Device("MyDevice").OSType)

VBScript

Log.Message Mobile.Device("MyDevice").OSType

DelphiScript

Log.Message(Mobile.Device('MyDevice').OSType);

C++Script, C#Script

Log["Message"](Mobile["Device"]("MyDevice")["OSType"]);

See Also

Testing Mobile Applications
AndroidDevice Object
iOSDevice Object

Highlight search results