Move To Element
Moves the mouse pointer (hovers) to the specified element on a web page
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 ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.
Input
- Page Id - The id of the page containing the element to which the mouse pointer will be moved. This ID is generated by the Open Browser node.
- Selector Type - The type of selector used to locate the element. Can be "XPath" or "CSS".
- Selector - The selector expression used to locate the element on the web page.
Options
- Wait Timeout (sec) - The maximum time in seconds to wait for the element to become available on the web page.
How It Works
- The node receives the Page ID, Selector Type, and Selector
- It validates that the Page ID and Selector are not empty
- It waits for any configured delay before execution
- It retrieves the active page session using the provided Page ID
- The node waits for the element to appear on the page (up to the Wait Timeout duration)
- Once the element is located, it retrieves the element from the selection
- The node moves the mouse pointer to the center of the element
- The mouse remains at that position until another action moves it
- The node applies any configured delay after execution
Requirements
- An active browser session created by the Open Browser node
- A valid Page ID from the Open Browser node
- A valid CSS or XPath selector that uniquely identifies the target element
- The target element must be visible and interactable on the page
- The element must appear within the specified Wait Timeout period
Error Handling
| Error Code | Description |
|---|---|
| Core.Browser.MoveToElement.ErrOnCreate | Configuration parsing error during node creation |
| Core.Browser.MoveToElement.ErrOnMessage | Error parsing incoming message data |
| Core.Browser.MoveToElement.ErrPageId | Page ID is empty or not provided |
| Core.Browser.MoveToElement.ErrSession | Invalid or expired Page ID, session not found |
| Core.Browser.MoveToElement.ErrSelector | Selector is empty or not provided |
| Core.Browser.MoveToElement.InvalidField | Invalid value for Wait Timeout field |
| Core.Browser.MoveToElement.WaitElement | Element not found within the specified timeout period |
| Core.Browser.MoveToElement.ErrElements | Failed to retrieve or interact with element |
Usage Examples
Example 1: Triggering Dropdown Menu
When you need to reveal a dropdown menu on hover:
1. Use Open Browser and navigate to the target page
2. Use Move to Element with:
- Selector Type: CSS
- Selector: .menu-item
- Wait Timeout: 5 seconds
3. The mouse hovers over the menu item
4. The dropdown menu becomes visible
5. Use Click Element to select an option from the revealed dropdown
Example 2: Revealing Hidden Tooltips
When extracting tooltip information that appears on hover:
1. Navigate to a page with tooltip elements
2. Use Move to Element with:
- Selector Type: XPath
- Selector: //div[@data-tooltip='info']
- Wait Timeout: 10 seconds
3. The tooltip appears when mouse hovers
4. Use Get Value to extract tooltip content
5. Continue with data processing
Example 3: Drag and Drop Preparation
When implementing drag and drop functionality:
1. Use Click Element with Hold Click on source element
2. Use Move to Element with:
- Selector Type: CSS
- Selector: .drop-target
- Wait Timeout: 5 seconds
3. Mouse moves to the target while holding the source
4. Use Click Element with Release Click
5. Complete the drag and drop operation
Usage Notes
- Move to Element does not click the element, it only hovers over it
- The mouse pointer moves to the center of the element by default
- Hover effects and tooltips triggered by mouse movement will activate
- This node is essential for interacting with hover-based UI elements
- The mouse remains at the element until another node moves it
- For Safari browsers, hover behavior may differ slightly
- Some elements may require the mouse to remain for a duration before showing content
Tips
- Use this node before clicking elements that only appear on hover
- Add a small Delay After to allow hover animations to complete
- Combine with Wait Element to ensure dynamic hover content loads fully
- For dropdown menus, move to the parent item before clicking child items
- Test hover interactions as they may behave differently across browsers
- Increase Wait Timeout for elements that load slowly or require AJAX calls
- Use CSS selectors for better performance when possible
- For elements with hover-triggered JavaScript, ensure adequate delay for execution
Related Nodes
- Open Browser - Creates the browser session and Page ID
- Click Element - Clicks elements after moving to them
- Wait Element - Waits for hover-triggered elements
- Get Value - Extracts data from hover-revealed elements
- Send Keys - Sends keyboard input after hovering