Drag and Drop using Playwright

Cerosh Jacob
3 min readAug 28, 2023

Drag and drop is a user interaction that involves moving an object by dragging it with the mouse. Automating drag and drop is challenging because it requires identifying both draggable and droppable elements, tracking the mouse cursor, simulating mouse dragging, and dropping the object.

In the early days of test automation tools, the drag-and-drop feature was achieved by integrating with a free, open-source automation tool called AutoIt, which was limited to automating Windows applications. Nowadays, most tools have this feature built-in. In Playwright, we can perform a…

--

--