Skip to main content

Mouse Click

Clicks on a specified location on the screen.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinuenOnError property is true, no error is caught when the project is executed even if the Catch node is used.

Input

  • X Coordinate - The x coordinate of the location on the screen where the click should occur.
  • Y Coordinate - The y coordinate of the location on the screen where the click should occur.

Options

  • Mouse Button - The mouse button to be used for the click. Available options:
    • Left
    • Center
    • Right
  • Click Type - The type of click to be performed. Available options:
    • Single Click
    • Double Click
    • Button Press (press and hold)
    • Button Release (release held button)
    • Press Down (deprecated, same as Button Press)
    • Press Release (deprecated, same as Button Release)
  • Key Modifier - The key modifier to be used while performing the click (e.g., shift, ctrl, alt).

How It Works

The Mouse Click node simulates mouse clicks at specified screen coordinates. The execution follows these steps:

  1. Delay Before - Waits for the specified delay before execution (if configured)
  2. Button Type Validation - Validates that the mouse button type is one of: left, center, or right
  3. Coordinate Retrieval - Retrieves the X and Y coordinates from input variables
  4. Coordinate Validation - Ensures X and Y are non-negative values
  5. Mouse Movement - Moves the mouse to the specified coordinates (if X > 0 or Y > 0)
    • If both X and Y are 0, clicks at the current mouse position without moving
  6. Key Modifier Press - If a key modifier is specified, holds down that key
  7. Click Execution - Performs the click based on the click type:
    • Single-click: One click with the specified button
    • Double-click: Two rapid clicks with the specified button
    • Button-press/Press-down: Holds the button down without releasing
    • Button-release/Press-release: Releases a held button
  8. Key Modifier Release - Releases any key modifier that was pressed
  9. Delay After - Waits for the specified delay after execution (if configured)

Requirements

  • Robomotion Deskbot - This node only works with Robomotion Deskbot (desktop automation)
  • Screen Coordinates - Valid screen coordinates within your display resolution
  • Operating System Support - Compatible with Windows, macOS, and Linux
  • Permissions - May require accessibility permissions on macOS and some Linux distributions
  • Display Setup - For multi-monitor setups, coordinates are relative to the primary display

Error Handling

Error CodeDescriptionCommon Cause
Core.Mouse.Click.ErrOnCreateConfiguration parse errorInvalid node configuration or corrupted flow
Core.Mouse.Click.ErrOnMessageMessage parse errorInvalid input message format
Core.Mouse.Click.ErrButtonTypeInvalid button typeButton type is not one of: left, center, right
Core.Mouse.Click.ErrClickTypeInvalid click typeClick type is not recognized
Core.Mouse.Click.ErrXYInvalid coordinatesX or Y coordinate is negative

Usage Examples

Example 1: Click Submit Button

Click a submit button at specific coordinates:

X Coordinate: 850
Y Coordinate: 520
Mouse Button: Left
Click Type: Single Click
Key Modifier: (empty)

Example 2: Right-Click for Context Menu

Right-click to open a context menu:

X Coordinate: 400
Y Coordinate: 300
Mouse Button: Right
Click Type: Single Click
Key Modifier: (empty)

Example 3: Ctrl+Click for Multi-Select

Click while holding Ctrl to select multiple items:

X Coordinate: {{itemX}}
Y Coordinate: {{itemY}}
Mouse Button: Left
Click Type: Single Click
Key Modifier: ctrl

Example 4: Double-Click to Open File

Double-click to open a file or folder:

X Coordinate: 600
Y Coordinate: 400
Mouse Button: Left
Click Type: Double Click
Key Modifier: (empty)

Example 5: Click at Current Position

Click at the current mouse position without moving:

X Coordinate: 0
Y Coordinate: 0
Mouse Button: Left
Click Type: Single Click
Key Modifier: (empty)

Usage Notes

  • Zero Coordinates - When both X and Y are 0, the node clicks at the current mouse position without moving
  • Coordinate System - Screen coordinates start at (0,0) in the top-left corner
  • Multi-Monitor - For multi-monitor setups, use absolute coordinates relative to the primary display
  • Key Modifiers - Common modifiers include: shift, ctrl, alt, command (macOS)
  • Press and Hold - Use "Button Press" to start a drag operation, then use "Button Release" to complete it
  • Deprecated Options - "Press Down" and "Press Release" are deprecated; use "Button Press" and "Button Release" instead

Tips

  1. Screen Capture - Use screen capture tools to identify exact coordinates for UI elements
  2. Variable Coordinates - Store frequently used coordinates in variables for reusability
  3. Add Delays - Use "Delay Before" to ensure the UI is ready before clicking
  4. Error Handling - Enable "Continue On Error" for clicks on potentially unstable or changing UI elements
  5. Image Detection - For more reliable automation, consider using image detection to find coordinates dynamically
  6. Resolution Awareness - Be aware that coordinates may differ across different screen resolutions
  7. Validation - Always validate that coordinates are within your screen bounds before execution
  8. Modifier Usage - When using key modifiers, ensure the target application supports the specific modifier+click combination