Sys.Desktop Property

Applies to TestComplete 15.69, last modified on November 13, 2024

Description

Use the Sys.Desktop property to get the Desktop object that corresponds to the PC’s desktop.

Declaration

Sys.Desktop

Read-Only Property The Desktop object

Applies To

The property is applied to the following object:

Sys

Property Value

The Desktop object that represents the desktop.

Example

The following example gets the currently active window and posts its screenshot and full name to the test log:

JavaScript, JScript

function Test()
{
  var w = Sys.Desktop.ActiveWindow();
  Log.Picture(w, "Active window", w.FullName);
}

Python

def Test():
  w = Sys.Desktop.ActiveWindow()
  Log.Picture(w, "Active window", w.FullName)

VBScript

Sub Test
  Dim w
  Set w = Sys.Desktop.ActiveWindow
  Call Log.Picture(w, "Active window", w.FullName)
End Sub

DelphiScript

procedure Test;
var w;
begin
  w := Sys.Desktop.ActiveWindow;
  Log.Picture(w, 'Active window', w.FullName);
end;

C++Script, C#Script

function Test()
{
  var w = Sys["Desktop"]["ActiveWindow"]();
  Log["Picture"](w, "Active window", w["FullName"]);
}

See Also

Desktop Object

Highlight search results