WindowToScreen Method

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

Use this method to get screen-related coordinates for coordinates that are relative to the onscreen object.

Declaration

TestObj.WindowToScreen(X, Y)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
X [in]    Required    Integer    
Y [in]    Required    Integer    
Result A Point object

Applies To

All onscreen objects.

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameters:

X

Specifies the horizontal coordinate of the point relative to the onscreen object.

Y

The vertical coordinate of the point relative to the onscreen object.

Result Value

The Point object that holds the resultant screen-related coordinates.

Remarks

  • Desktop testing: If TestObj refers to an object of a non-DPI-aware application running with a DPI setting other than 100%, set the X and Y parameter values relative to the application (as if the application is running with the 100% DPI setting).

  • Web testing: If the Use CSS pixels for scaled pages option is enabled (by default), set the X and Y parameter values relative to the web page, regardless of the browser zoom and the system's DPI setting.

See Also

Point Object
ScreenToWindow Method

Highlight search results