agentic_mouse_action method performs mouse actions at specific screen coordinates captured during a recording. If the action fails at those coordinates (e.g., due to page layout changes), it falls back to the Operator agent using a natural language query.
This method is primarily used by agents generated through Imitation Learning, where click coordinates are captured during recording. For most manual automations, prefer
agentic_selector() which targets elements by CSS selectors.Method Signature
Parameters
AgenticMouseAction
required
The mouse action to perform. Supported actions:
RecordedClick
required
The coordinates and viewport dimensions from when the action was originally recorded.
str
required
Natural language instruction for the Operator agent to use if the coordinate-based action fails.
bool
default:"True"
Whether to resize the browser window to match the recorded viewport dimensions before performing the action. This improves accuracy when the page layout is responsive.
int | None
default:"60"
Maximum time in seconds to wait for the operation to complete.
Return Value
This method returnsNone and completes when the action has been performed successfully.