moveTo

Move the mouse by an offset of the specified element. If no element is specified, the move is relative to the current mouse cursor. If an element is provided but no offset, the mouse will be moved to the center of the element. If the element is not visible, it will be scrolled into view.

This command is deprecated and will be removed soon. Make sure you don’t use it in your automation/test scripts anymore to avoid errors.

Usage

1
browser.moveTo(element,xoffset,yoffset);

Parameters

Param Type Details
element String Opaque ID assigned to the element to move to, as described in the WebElement JSON Object. If not specified or is null, the offset is relative to current position of the mouse.
xoffset Number X offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element.
yoffset Number Y offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element.