Mouse package guide
Move the Windows pointer, click at a screen or window point, and turn the mouse wheel.
Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.
Prerequisites
- The Device desktop must be signed in, unlocked and connected. A locked or disconnected desktop can refuse pointer movement and clicks.
- Coordinates are whole numbers of pixels. They point somewhere else if the screen size, the display scaling or the window position change.
- The actions do not check what the application did.
- Test on a drawing area or a long document that is safe to change. Close it after the test.
- After a
BUTTON_DOWN, always send aBUTTON_UP.
Actions
Click (mouseClick)
Move the pointer to a point and send a button event. Points count from the window's outer corner, including the title bar and border.
Inputs
| Input | Editor field | Type; default; editor rule | Value |
|---|---|---|---|
window | Window title | Stringdefault emptyoptional. | Title, e.g. Automation Sample. The window comes to the front, and the point counts from its outer top-left corner. Empty: the point is on the screen, but with window it counts from the window in front. |
window | Window title is | Windowdefault Containsoptional. | Contains (part of the title), Exact (the whole title), Wildcard (* any text, ? one character), Regex (a regular expression), or Active (the window in front; the title is ignored). Case does not matter. |
coordinate | Mouse position X | Numberdefault 0optional. | X in pixels from the window's top-left corner (or the screen, if no window). |
coordinate | Mouse position Y | Numberdefault 0optional. | Y in pixels from the same corner. Larger values go down. |
mouse | Button | Mousedefault LEFT_optional. | LEFT_, RIGHT_ or MIDDLE_. A right click can open a menu. |
event | Event | Mousedefault SINGLE_optional. | SINGLE_: press and release once. DOUBLE_: twice. BUTTON_: hold the button until a later BUTTON_. BUTTON_: release it. |
Outputs
None.
Example
Open a drawing window titled Automation Sample, 800 × 600, where (150,150) from its outer top-left corner is empty canvas. Set windowTitle=Automation Sample, windowTitleMatch=Contains, coordinateToX=150, coordinateToY=150, mouseButton=LEFT_BUTTON, event=SINGLE_CLICK.
Expected result
The window comes to the front and gets one left click at (150,150). The step fails before the click if the window is not found.
Move (mouseMove)
Put the pointer on one screen point, wait, then put it on a second point. It jumps; it does not glide or click.
Inputs
| Input | Editor field | Type; default; editor rule | Value |
|---|---|---|---|
coordinate | Mouse from X | Numberdefault 0optional. | First X in pixels on the screen. |
coordinate | Mouse from Y | Numberdefault 0optional. | First Y in pixels on the screen. Larger values go down. |
coordinate | Mouse to X | Numberdefault 0optional. | Last X in pixels on the screen. |
coordinate | Mouse to Y | Numberdefault 0optional. | Last Y in pixels on the screen. |
delay | Delay in milliseconds(ms) | Numberdefault 0optional. | Pause in ms between the two points. 0 or less: no pause. |
Outputs
None.
Example
Make sure both screen points are safe. Set coordinateFromX=300, coordinateFromY=300, coordinateToX=450, coordinateToY=350, delay=250.
Expected result
The pointer goes to (300,300), waits 250 ms, then stops at (450,350). It can show hover effects but does not click. If the pointer cannot move, the step fails.
Scroll (mouseScroll)
Turn the mouse wheel where the pointer is now. Use Move first to put the pointer over the area to scroll.
Inputs
| Input | Editor field | Type; default; editor rule | Value |
|---|---|---|---|
mouse | Select scroll option | Scrolldefault UPoptional. | UP or DOWN. |
iteratation | Number of iterations | Numberdefault 0optional. | Number of wheel notches. 0 or less sends nothing. |
delay | Delay in milliseconds(ms) | Numberdefault 0optional. | Pause in ms after each notch, also the last. 0 or less: no pause. |
Outputs
None.
Example
Put the pointer over a long document. Set mouseScrollDirection=DOWN, iteratation=3, delay=100.
Expected result
Three notches down are sent, with 100 ms after each. The application decides how far it scrolls, and it does not move at the end of the document. iteratation=0 sends nothing and does not wait.