Skip to main content

moveCursorTo

info

This command is temporary and will be removed in the next major (testplane@9.x). Differs from the standard moveTo in that it moves the cursor relative to the top-left corner of the element (like it was in hermione@7).

Use the moveCursorTo command to move the mouse by specified offsets along the X and Y axes relative to the specified element.

If offset is not specified then mouse will be moved to the top-left corder of the element.

Usage

await browser.$(selector).moveCursorTo({ xOffset, yOffset });

Command Parameters

NameTypeDescription
xOffsetnumber

The X-axis offset relative to the top-left corner of the element. If not specified, the mouse will move to the top-left corner of the element.

yOffsetnumber

The Y-axis offset relative to the top-left corner of the element. If not specified, the mouse will move to the top-left corner of the element.