MouseDown method to simulate pressing of a mouse button. The method performs the same action as the MouseDown event of a low-level procedure.
LLPlayer.MouseDown(Button, X, Y, Delay)
The method is applied to the following object:
The method has the following parameters:
A constant specifying the mouse button, the pressing of which is to be simulated. You can use the following constants to specify the mouse button (these constants are provided by the Win32API plug-in).
||The left mouse button.
||The right mouse button.
||The middle mouse button.
Specifies the horizontal coordinate of the point for the click.
Specifies the vertical coordinate of the point for the click.
The number of milliseconds passed after you command TestComplete to simulate the pressing of a mouse button and before TestComplete starts simulating the pressing. The delay gives you the possibility to better emulate real-life conditions. Also, it is necessary to separate the pressing from other low-level events in order to enable the operating system to properly process it.
If Delay is negative, it is set to the Auto-wait timeout.
If Delay is greater than 1000, the waiting progress will be shown in TestComplete’s indicator during the test run.
The code below simulates pressing the left mouse button and then releasing it using the