Position Action

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

Description

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

Declaration

TestObj.Position(LeftTopWidthHeight)

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.

Parameters

The method has the following parameters:

Left

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

Top

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

Width

Specifies the desired width of the window in pixels.

Height

Specifies the desired height of the window in pixels.

Result Value

None.

Remarks

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

Example

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