Desktop 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 an iOSDesktop object that provides information about the iOS device's desktop.

Declaration

iOSDeviceObj.Desktop

Read-Only Property A iOSDesktop 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

An iOSDesktop object that provides information on the iOS device's desktop.

Example

The following code gets the Desktop object and posts the value of its properties to the Test Log:

JavaScript, JScript

function GetDeskInfo()
{
  var DeskObj = Mobile.Device("iOSDevice").Desktop;
  Log.Message("Width: " + DeskObj.Width);
  Log.Message("Height: " + DeskObj.Height);
}

Python

def GetDeskInfo():
   DeskObj = Mobile.Device("iOSDevice").Desktop
   Log.Message("Width: " + VarToStr(DeskObj.Width))
   Log.Message("Height: " + VarToStr(DeskObj.Height))

VBScript

Sub GetDeskInfo
  Set DeskObj = Mobile.Device("iOSDevice").Desktop
  Log.Message("Width: " & VarToStr(DeskObj.Width))
  Log.Message("Height: " & VarToStr(DeskObj.Height))
End Sub

DelphiScript

procedure GetDeskInfo();
var DeskObj;
begin
   DeskObj := Mobile.Device('iOSDevice').Desktop;
   Log.Message('Width: ' + VarToStr(DeskObj.Width));
   Log.Message('Height: ' + VarToStr(DeskObj.Height));
end;

C++Script, C#Script

function GetDeskInfo()
{
  var DeskObj = Mobile["Device"]("iOSDevice")["Desktop"];
  Log["Message"]("Width: " + DeskObj["Width"]);
  Log["Message"]("Height: " + DeskObj["Height"]);
}

See Also

iOSDesktop Object
iOSDevice Object
Testing Android Applications (Legacy)

Highlight search results