Applies to TestComplete 14.10, last modified on June 5, 2019


Use this method to simulate pressing a mouse button at a point with the specified screen coordinates.



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

Applies To

The method is applied to the following object:

View Mode

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


The method has the following parameters:


Specifies the button to be pressed. You can use the following values for the parameter:

Constant Value Description
VK_LBUTTON 1 The left mouse button.
VK_RBUTTON 2 The right mouse button.
VK_MBUTTON 4 The middle mouse button.

If the Win32API plugin is installed in TestComplete, you can refer to the constants using their names without defining them in scripts.


The screen-relative horizontal coordinate of the pixel at which pressing the mouse button will be simulated.


The screen-relative vertical coordinate of the pixel at which pressing the mouse button will be simulated.

Result Value



Unlike Click, ClickM, ClickR, DblClick, DblClickM and DblClickR, the MouseDown method does not interact with the tested application. This makes the method useful for testing specific ActiveX controls.

To release the mouse button, use the MouseUp method.

See Also

MouseUp Method (Desktop Objects)
Click Action
ClickR Action
ClickM Action
DblClick Action
DblClickR Action
DblClickM Action

Highlight search results