WindowToScreen Method (Mobile Objects)

Applies to TestComplete 14.80, last modified on April 20, 2021
This method is available in legacy mobile tests that work with devices connected to the local computer. To learn how to simulate user actions in newer cloud-compatible mobile tests, see the Simulating user actions in tests section.

Description

Use this method to get coordinates relative to the mobile device's screen from coordinates that are relative to the object.

Declaration

TestObj.WindowToScreen(XY)

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 Android, iOS and Xamarin.Forms 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 that is relative to the mobile object.

Y

The vertical coordinate of the point that is relative to the mobile object.

Result Value

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

See Also

About Testing Android Applications (Legacy)
Testing iOS Applications (Legacy)
Point Object
ScreenToWindow Method (Mobile Objects)

Highlight search results