[Expand]General Information/viewarticle/88628/
 [Expand]Using Help System/viewarticle/81465/
 [Expand]Getting Started Tutorial/viewarticle/82003/
 [Expand]Using TestComplete/viewarticle/84431/
 [Expand]Testing Types/viewarticle/85355/
 [Expand]Applications Testing/viewarticle/83383/
 [Expand]Working With Application Objects and Controls/viewarticle/81481/
 [Expand]Samples and Tutorials/viewarticle/81997/
  [Collapse]Test Objects/viewarticle/82423/
   [Expand]Controls and Objects/viewarticle/87889/
   [Collapse]Methods and Properties/viewarticle/83416/
    [Expand]Common Methods and Properties (Desktop)/viewarticle/88655/
    [Expand]Common Methods and Properties (Web)/viewarticle/82800/
      MainMenu Property/viewarticle/83787/
      MappedName Property/viewarticle/83817/
      wMax Property (Android Controls)/viewarticle/84008/
      wMax Property (Pager Controls)/viewarticle/83041/
      wMax Property (ScrollBar Controls)/viewarticle/86580/
      Max Property (ScrollBar Object)/viewarticle/85991/
      wMax Property (Specific to Android NumberPicker Controls)/viewarticle/89148/
      wMax Property (Specific to Flex ScrollBar and JavaFX ScrollBar Controls)/viewarticle/82732/
      wMax Property (Specific to Flex Slider Controls)/viewarticle/88874/
      wMax Property (Specific to iOS Slider Controls)/viewarticle/82366/
      wMax Property (Specific to iOS Stepper Controls)/viewarticle/85589/
      wMax Property (Specific to QtDateTimeEdit Controls)/viewarticle/82597/
      wMax Property (Specific to WPFTrackBar Controls)/viewarticle/88395/
      wMax Property (TrackBar and Slider Controls)/viewarticle/85394/
      wMax Property (QtDoubleSpinBox Controls)/viewarticle/85804/
      wMax Property (QtSpinBox Controls)/viewarticle/89167/
      wMax Property (UpDown Controls)/viewarticle/86154/
      wMaxDate Property (Android Controls)/viewarticle/89010/
      wMaxDate Property (Calendar Controls)/viewarticle/88422/
      wMaxDate Property (DateEdit Controls)/viewarticle/86010/
      wMaxDate Property (DateTimePicker Controls)/viewarticle/87020/
      wMaxDate Property (Specific to YUI 2 Calendar Controls)/viewarticle/83198/
      wMaxDateRange Property (MonthCalendar Controls)/viewarticle/83562/
      wMaxTime Property (DateTimePicker Controls)/viewarticle/88343/
      Maximize Action/viewarticle/83831/
      wMaxX Property (Specific to YUI 2 Slider Controls)/viewarticle/88894/
      wMaxX Property (iOS Controls)/viewarticle/83862/
      wMaxY Property (Specific to YUI 2 Slider Controls)/viewarticle/83584/
      wMaxY Property (iOS Controls)/viewarticle/85819/
      wMaxYear Property (Calendar and DateTimePicker Controls)/viewarticle/87665/
      MemUsage Property (Sys Object)/viewarticle/88696/
      MemUsage Property (Process Object)/viewarticle/82243/
      Message Property (Web Objects)/viewarticle/86535/
      wMessage Property (Specific to iOS AlertView Object)/viewarticle/83085/
      wMin Property (Android Controls)/viewarticle/88686/
      wMin Property (Pager Controls)/viewarticle/83748/
      wMin Property (ScrollBar Controls)/viewarticle/83896/
      Min Property (ScrollBar Object)/viewarticle/88331/
      wMin Property (Specific to Android NumberPicker Controls)/viewarticle/86890/
      wMin Property (Specific to Flex ScrollBar and JavaFX ScrollBar Controls)/viewarticle/86526/
      wMin Property (Specific to Flex Slider Controls)/viewarticle/86292/
      wMin Property (Specific to iOS Slider Controls)/viewarticle/87227/
      wMin Property (Specific to iOS Stepper Controls)/viewarticle/88360/
      wMin Property (Specific to QtDateTimeEdit Controls)/viewarticle/83924/
      wMin Property (Specific to WPFTrackBar Controls)/viewarticle/87077/
      wMin Property (TrackBar and Slider Controls)/viewarticle/88908/
      wMin Property (QtDoubleSpinBox Controls)/viewarticle/83351/
      wMin Property (QtSpinBox Controls)/viewarticle/86379/
      wMin Property (UpDown Conrtrols)/viewarticle/82504/
      wMinDate Property (Android Controls)/viewarticle/86587/
      wMinDate Property (Calendar Controls)/viewarticle/82641/
      wMinDate Property (DateEdit Controls)/viewarticle/85137/
      wMinDate Property (DateTimePicker Controls)/viewarticle/89219/
      wMinDate Property (Specific to YUI 2 Calendar Controls)/viewarticle/85126/
      wMinTime Property (DateTimePicker Controls)/viewarticle/88441/
      wMinRange Property (Specific to YUI 2 Dual Thumb Slider Controls)/viewarticle/85826/
      wMinX Property (Specific to YUI 2 Slider Controls)/viewarticle/84361/
      wMinX Property (iOS Controls)/viewarticle/86127/
      wMinY Property (Specific to YUI 2 Slider Controls)/viewarticle/86518/
      wMinY Property (iOS Controls)/viewarticle/86627/
      wMinYear Property (Calendar and DateTimePicker Controls)/viewarticle/89185/
      Minimize Action/viewarticle/83359/
      MouseDown Method (Desktop Objects)/viewarticle/87092/
      MouseUp Method (Desktop Objects)/viewarticle/83945/
      MouseWheel Action/viewarticle/80825/
      MouseX Property (Desktop Objects)/viewarticle/88550/
      MouseY Property (Desktop Objects)/viewarticle/82192/
      MoveToDate Action (Specific to AngularUI Calendar Controls)/viewarticle/88363/
      MoveToPage Action (Specific to Telerik RadFridView for WPF Controls)/viewarticle/83816/
      MSAADisp Property/viewarticle/83318/
      MSAAObject Method/viewarticle/85157/
      MultiSelect Action (Android Controls)/viewarticle/88105/
      MultiSelect Action (ComboBox Controls)/viewarticle/83969/
      MultiSelect Action (ListBox Controls)/viewarticle/82412/
      MultiSelect Action (ListView Controls)/viewarticle/85000/
      MultiSelect Method (Specific to iOS TableView Controls)/viewarticle/84900/
      wMultiSelect Property (MonthCalendar Controls)/viewarticle/82799/
      MultiWorkAreas Property (ListViewStyleEx Objects)/viewarticle/88795/
  [Expand]Scripting Objects/viewarticle/88052/
  [Expand]Project and Project Item Objects/viewarticle/84209/
  [Expand]TestComplete Events/viewarticle/83126/
  [Expand]Language Reference/viewarticle/87902/
  [Expand]User Form Components/viewarticle/83917/
   Regular Expressions Syntax/viewarticle/81060/
 [Expand]Other Tools That Help You Test Better/viewarticle/82893/
 [Expand]TestComplete Licensing Guide/viewarticle/88365/
Updated: 10/12/2016 Applies To: TestComplete 12 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Programming Reference

MouseDown Method (Desktop Objects)


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:


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

© 2016 SmartBear Software. All rights reserved.
Email Send feedback on this document