[Collapse]TestComplete/viewarticle/63445/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Expand]Getting Started Tutorial/viewarticle/56246/
 [Expand]Using TestComplete/viewarticle/57875/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Expand]Working With Application Objects and Controls/viewarticle/55815/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Collapse]References/viewarticle/57878/
  [Collapse]Test Objects/viewarticle/57881/
   [Expand]Controls and Objects/viewarticle/59743/
   [Collapse]Methods and Properties/viewarticle/62328/
    [Expand]Common Methods and Properties (Desktop)/viewarticle/62329/
    [Expand]Common Methods and Properties (Web)/viewarticle/62327/
    [Expand]A
    [Expand]B
    [Expand]C
    [Expand]D
    [Expand]E
    [Expand]F
    [Expand]G
    [Expand]H
    [Expand]I
    [Expand]J
    [Expand]K
    [Expand]L
    [Collapse]M
      MainMenu Property/viewarticle/57360/
      MappedName Property/viewarticle/57305/
      wMax Property (Android Controls)/viewarticle/62309/
      wMax Property (Pager Controls)/viewarticle/61719/
      wMax Property (ScrollBar Controls)/viewarticle/60449/
      Max Property (ScrollBar Object)/viewarticle/62049/
      wMax Property (Specific to Flex ScrollBar and JavaFX ScrollBar Controls)/viewarticle/61884/
      wMax Property (Specific to Flex Slider Controls)/viewarticle/61490/
      wMax Property (Specific to iOS Slider Controls)/viewarticle/63553/
      wMax Property (Specific to iOS Stepper Controls)/viewarticle/63707/
      wMax Property (Specific to QtDateTimeEdit Controls)/viewarticle/61087/
      wMax Property (Specific to WPFTrackBar Controls)/viewarticle/61850/
      wMax Property (TrackBar and Slider Controls)/viewarticle/60470/
      wMax Property (QtDoubleSpinBox Controls)/viewarticle/62052/
      wMax Property (QtSpinBox Controls)/viewarticle/61093/
      wMax Property (UpDown Controls)/viewarticle/61797/
      wMaxDate Property (Android Controls)/viewarticle/62266/
      wMaxDate Property (Calendar Controls)/viewarticle/60793/
      wMaxDate Property (DateEdit Controls)/viewarticle/60313/
      wMaxDate Property (DateTimePicker Controls)/viewarticle/61400/
      wMaxDate Property (Specific to YUI 2 Calendar Controls)/viewarticle/61357/
      wMaxDateRange Property (MonthCalendar Controls)/viewarticle/61716/
      Maximize Action/viewarticle/60692/
      wMaxX Property (Specific to YUI 2 Slider Controls)/viewarticle/61377/
      wMaxX Property (iOS Controls)/viewarticle/63621/
      wMaxY Property (Specific to YUI 2 Slider Controls)/viewarticle/61376/
      wMaxY Property (iOS Controls)/viewarticle/63721/
      wMaxYear Property (Calendar and DateTimePicker Controls)/viewarticle/61936/
      MemUsage Property (Sys Object)/viewarticle/61209/
      MemUsage Property (Process Object)/viewarticle/61065/
      Message Property (Web Objects)/viewarticle/61422/
      wMessage Property (Specific to iOS AlertView Object)/viewarticle/63584/
      wMin Property (Android Controls)/viewarticle/62312/
      wMin Property (Pager Controls)/viewarticle/61720/
      wMin Property (ScrollBar Controls)/viewarticle/60450/
      Min Property (ScrollBar Object)/viewarticle/62050/
      wMin Property (Specific to Flex ScrollBar and JavaFX ScrollBar Controls)/viewarticle/61886/
      wMin Property (Specific to Flex Slider Controls)/viewarticle/61491/
      wMin Property (Specific to iOS Slider Controls)/viewarticle/63780/
      wMin Property (Specific to iOS Stepper Controls)/viewarticle/63837/
      wMin Property (Specific to QtDateTimeEdit Controls)/viewarticle/61088/
      wMin Property (Specific to WPFTrackBar Controls)/viewarticle/61849/
      wMin Property (TrackBar and Slider Controls)/viewarticle/60471/
      wMin Property (QtDoubleSpinBox Controls)/viewarticle/62053/
      wMin Property (QtSpinBox Controls)/viewarticle/61094/
      wMin Property (UpDown Conrtrols)/viewarticle/61799/
      wMinDate Property (Android Controls)/viewarticle/62269/
      wMinDate Property (Calendar Controls)/viewarticle/60791/
      wMinDate Property (DateEdit Controls)/viewarticle/60314/
      wMinDate Property (DateTimePicker Controls)/viewarticle/61399/
      wMinDate Property (Specific to YUI 2 Calendar Controls)/viewarticle/61360/
      wMinRange Property (Specific to YUI 2 Dual Thumb Slider Controls)/viewarticle/61366/
      wMinX Property (Specific to YUI 2 Slider Controls)/viewarticle/61375/
      wMinX Property (iOS Controls)/viewarticle/63733/
      wMinY Property (Specific to YUI 2 Slider Controls)/viewarticle/61380/
      wMinY Property (iOS Controls)/viewarticle/63751/
      wMinYear Property (Calendar and DateTimePicker Controls)/viewarticle/61937/
      Minimize Action/viewarticle/60693/
      MouseDown Method (Desktop Objects)/viewarticle/58893/
      MouseUp Method (Desktop Objects)/viewarticle/58890/
      MouseWheel Action/viewarticle/55273/
      MouseX Property (Desktop Objects)/viewarticle/61964/
      MouseY Property (Desktop Objects)/viewarticle/61965/
      MSAADisp Property/viewarticle/61443/
      MSAAObject Method/viewarticle/56458/
      MultiSelect Action (Android Controls)/viewarticle/62233/
      MultiSelect Action (ListBox Controls)/viewarticle/60282/
      MultiSelect Action (ListView Controls)/viewarticle/61869/
      MultiSelect Method (Specific to iOS TableView Controls)/viewarticle/63857/
      wMultiSelect Property (MonthCalendar Controls)/viewarticle/61714/
      MultiWorkAreas Property (ListViewStyleEx Objects)/viewarticle/61695/
    [Expand]N
    [Expand]O
    [Expand]P
    [Expand]Q
    [Expand]R
    [Expand]S
    [Expand]T
    [Expand]U
    [Expand]V
    [Expand]W
    [Expand]X
    [Expand]Y
    [Expand]Z
  [Expand]Scripting Objects/viewarticle/57882/
  [Expand]Project and Project Item Objects/viewarticle/57880/
  [Expand]TestComplete Events/viewarticle/56945/
  [Expand]Language Reference/viewarticle/57879/
  [Expand]User Form Components/viewarticle/56689/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete 10 Licensing Guide/viewarticle/63451/
Updated: 4/23/2014 Applies To: TestComplete 10 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Programming Reference

MouseDown Method (Desktop Objects)

Description

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

Declaration

TestObj.MouseDown(VKXY)

   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:

Parameters

The method has the following parameters:

VK

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 plug-in is installed in TestComplete, you can refer to the constants using their names without defining them in scripts.

X

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

Y

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

Result Value

None.

Remarks

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


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