Move to - operation

  • Browsers
  • LG webOS

This operation moves the mouse pointer to the specified position or target.


This operation is not supported in Safari browsers older than version 13.1 due to an issue inside official Safari's WebDriver.

To perform this operation in the Suitest Test editor use the Move to line:

Hovering over a drop-down menu to reveal elements hidden inside

To perform this operation in the Suitest JavaScript API use the moveTo command:

await suitest.element('dropdownMenu').moveTo();

Typically you would use Move to command to reveal hidden elements before clicking on them. For example if you need to click on a hidden element A which is revealed when hovering element B. Use Move to hover B and then click on A.

You can combine the operation with an Assertion and move the pointer only if a condition is satisfied.

In Suitest Editor:

Hovering a drop-down menu only if a menu item is not visible

In JavaScript API:

const menuItem = suitest.element('dropdownMenuItem');
if (await menuItem.matches(suitest.PROP.HEIGHT, 0)) {
    await suitest.element('dropdownMenu').moveTo();
}

Moving to relative position

  • LG webOS

Relative position is meant in context of current cursor position. If the cursor is out of the reach, then middle of the screen is used as the base.

// move the cursor by 100 px down
await suitest.relativePosition(0,-100).moveTo();