Mouse Scroll
Scrolls the mouse wheel
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.
if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.
Input
- Line Count - Number of lines to scroll. Default value is 0.
Options
- Direction - Direction to scroll. Available options:
- Down (default)
- Up
- Left
- Right
How It Works
The Mouse Scroll node simulates scrolling the mouse wheel in a specified direction. The execution follows these steps:
- Delay Before - Waits for the specified delay before execution (if configured)
- Line Count Retrieval - Retrieves the number of lines to scroll from the input variable
- Direction Validation - Validates that the direction is one of: down, up, left, or right
- Scroll Execution - Performs the scroll operation using robotgo's ScrollDir function
- Delay After - Waits for the specified delay after execution (if configured)
The scroll occurs at the current mouse position, affecting whichever scrollable element is under the cursor.
Requirements
- Robomotion Deskbot - This node only works with Robomotion Deskbot (desktop automation)
- Scrollable Content - The element under the mouse cursor must support scrolling
- Operating System Support - Compatible with Windows, macOS, and Linux
- Permissions - May require accessibility permissions on macOS and some Linux distributions
Error Handling
| Error Code | Description | Common Cause |
|---|---|---|
Core.Mouse.Scroll.ErrOnCreate | Configuration parse error | Invalid node configuration or corrupted flow |
Core.Mouse.Scroll.OnMessage | Message parse error | Invalid input message format |
Core.Mouse.Scroll.ErrScrollType | Invalid scroll type | Direction is not one of: down, up, left, right |
Usage Examples
Example 1: Scroll Down a Webpage
Scroll down 5 lines to view more content:
Line Count: 5
Direction: Down
This is useful for loading more content on infinite scroll pages or viewing information below the fold.
Example 2: Scroll Up to Top
Scroll up 10 lines to return to earlier content:
Line Count: 10
Direction: Up
Example 3: Dynamic Scroll Amount
Scroll a variable number of lines based on content:
Line Count: {{scrollAmount}}
Direction: Down
Use variables to make scroll amounts configurable based on automation logic.
Example 4: Horizontal Scroll
Scroll horizontally in applications with horizontal content:
Line Count: 3
Direction: Right
Useful for wide tables, timelines, or horizontally scrolling galleries.
Example 5: Infinite Scroll Loading
Repeatedly scroll to load more content:
Line Count: 3
Direction: Down
Delay After: 1.5
Add a delay after scrolling to allow content to load before the next action.
Usage Notes
- Mouse Position - The scroll affects the element currently under the mouse cursor
- Line Count - Higher numbers scroll more; the actual distance depends on the application's scroll sensitivity
- Zero Lines - Setting line count to 0 will not scroll
- Direction Support - Left and right scrolling works in applications that support horizontal scrolling
- Scroll Distance - The actual pixel distance scrolled varies by application and system settings
- Focus Matters - Some applications require the window to be focused to accept scroll events
Tips
- Position First - Use Mouse Hover to position the cursor over the scrollable element before scrolling
- Add Delays - Use "Delay After" when scrolling to load content (e.g., infinite scroll pages)
- Variable Lines - Use variables for line count to make automation flexible
- Multiple Scrolls - For large scrolls, use multiple small scroll operations with delays to allow content loading
- Test Sensitivity - Test scroll line counts as different applications have different scroll sensitivities
- Check Focus - Ensure the target window/element is focused if scrolling doesn't work
- Smooth Scrolling - For applications with smooth scrolling, add delays between scroll operations
- Reach Element - Combine with element detection to scroll until a specific element becomes visible
Related Nodes
- Mouse Hover - For positioning the cursor over scrollable areas
- Mouse Click - For clicking elements after scrolling
- Mouse Drag - For alternative scrolling using scrollbar dragging