Desktop Property

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

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

Highlight search results