mouseDown(). Call it on the element where the drag should end:
element.mouseUp()
Moves the mouse to the point wherefind() located the element, then releases the left button. Because the mouse moves before the release, the app sees a drag rather than a jump. It’s the same as element.click('mouseUp').
Errors
Throws anElementNotFoundError if find() didn’t locate the element. See click() for how to check found() first.
Release at coordinates
The client has nomouseUp() method. To release the button at a point on the screen, pass action: 'mouseUp' to testdriver.click():
element.mouseUp(), which keeps working when the layout or screen size changes.
Examples
Drop a file into an upload area
Resize a panel
Complete example
tests/drag-and-drop.test.mjs
Related
- mouseDown(): press the button
- hover(): move the mouse while the button is down
- click(): a full press and release
- Perform actions: every kind of action in one guide

