Description
Use the ClickM
action to simulate a click of the middle mouse button over the control specified by its image in the Image Repository.
Declaration
ImageSetItem.ClickM(X, Y, Shift, SearchArea)
ImageSetItem | ||||
X | [in] | Optional | Integer | Default value: -1 |
Y | [in] | Optional | Integer | Default value: -1 |
Shift | [in] | Optional | TShiftKey | Default value: skNoShift |
SearchArea | [in] | Optional | Object | |
Result | None |
Applies To
Parameters
The method has the following parameters:
X
Specifies the horizontal coordinate of the point of the click.
This coordinate is relative to to the top-left corner of the control’s recognition area marked with a red frame in the Preview box of the ImageSet editor.
If the parameter is omitted, the click will be simulated in the center of the recognition area.
Y
Specifies the vertical coordinate of the point of the click.
This coordinate is relative to to the top-left corner of the control’s recognition area marked with a red frame in the Preview box of the ImageSet editor.
If the parameter is omitted, the click will be simulated in the center of the recognition area.
Shift
Sets whether the Shift, Alt or Ctrl keys are pressed during the click (see TShiftKey). By default, this parameter is skNoShift
(no shift keys are pressed). Sometimes, the Shift parameter may not be enough, and you may need to simulate key presses in script code. See Simulating Keystrokes.
SearchArea
Specifies the area, within which the method will search for the image. Can take the following values:
-
Your current computer desktop. Access it by calling the
Sys
object or theSys.Desktop
property. -
A window or onscreen object in your desktop or web application.
If the parameter is omitted, the method will search for the image on your PC desktop.
Result Value
None.
See Also
Image-Based Testing
Click Method (ImageSetItem Object)
ClickR Method (ImageSetItem Object)
DblClickM Method (ImageSetItem Object)
Drag Method (ImageSetItem Object)