Position Action

Applies to TestComplete 15.64, last modified on June 12, 2024


This action sets the size and position of the window if it is a top-level window or an MDI-child window.


TestObj.Position(Left, Top, Width, Height)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Left [in]    Required    Integer    
Top [in]    Required    Integer    
Width [in]    Required    Integer    
Height [in]    Required    Integer    
Result None

Applies To

The method is applied to the following objects:

View Mode

This method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.


The method has the following parameters:


Specifies the desired horizontal coordinate of the window’s left edge. This coordinate is relative to the screen.


Specifies the desired vertical coordinate of the window’s top. This coordinate is relative to the screen.


Specifies the desired width of the window in pixels.


Specifies the desired height of the window in pixels.

Result Value



This action has no effect on popup windows and controls, except that an error message is inserted into the test log.


To view an example that demonstrates how to use the Position method, see Simulating User Actions on Application Windows.

See Also

Maximize Action
Minimize Action
Restore Action

Highlight search results