Cypress drag from point a to point b

Donald Le
Feb 6, 2023

--

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=”https://unsplash.com/@simonpallard?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Simon PALLARD</a> on <a href=”https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">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.

~~PEACE~~

--

--

Donald Le

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