element.hover()
Moves the mouse to the point wherefind() located the element. It’s the same as element.click('hover').
Errors
Throws anElementNotFoundError if find() didn’t locate the element. See click() for how to check found() first.
testdriver.hover(options)
Moves the mouse to a point on the screen by its coordinates. Preferelement.hover(), which keeps working when the layout or screen size changes.
object
required
The older form
testdriver.hover(x, y) still works. Use the options object in new tests.Examples
Read a tooltip
Check a hover style
Drag an item
hover() moves the mouse while the button is held down by mouseDown():
Complete example
tests/hover.test.mjs
Related
- find(): locate the element to hover over
- click(): click after a menu opens
- mouseDown() and mouseUp(): drag and drop
- Perform actions: every kind of action in one guide

