Cypress drag from point a to point b


It takes me a whole day to figure out how to drag from point a to point b using cypress, so I thought I should share this for someone wants to do the task like me.

Photo by <a href=”">Simon PALLARD</a> on <a href=”">Unsplash</a>

First you need to mousedown, then mousemove to the first point (point A), then mouse up at the second point (point B).

I tried with mousedown, then mouse move point A, then mouse move point B, then mouse up but it did not work.

Hope this helps.




Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.