Zum Hauptinhalt springen

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.

Usage
$(selector).moveTo({ xOffset, yOffset })
Parameters
NameTypeDetails
options
optional
MoveToOptionsmoveTo command options
options.xOffset
optional
NumberX offset to move to, relative to the center of the element. If not specified, the mouse will move to the center of the element.
options.yOffset
optional
NumberY offset to move to, relative to the center of the element. If not specified, the mouse will move to the center of the element.

Welcome! How can I help?

WebdriverIO AI Copilot