Skip to main content

Overview

The mouseUp() method releases the mouse button. It completes a drag operation or a custom mouse gesture that you started with mouseDown(). Call it without parameters to release the button at the present mouse position.

Syntax

Parameters

None. The mouse button is released at the current cursor position.

Returns

It returns a Promise<void>. The promise resolves when TestDriver releases the mouse button.

Examples

Complete Drag and Drop

Selecting Multiple Files

Drawing Application

Resizing Window Panels

Drag to Reorder List Items

Text Selection with Mouse

Important Notes

  • mouseUp() must be preceded by mouseDown() to have an effect
  • Releases the button at the current cursor position
  • Completes any drag or selection operation that was in progress
  • For simple clicks, use click() instead of mouseDown/mouseUp pair