Skip to content

Instantly share code, notes, and snippets.

@cuongld2
Created February 6, 2023 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuongld2/d2fdc0a1b6edb3d11dbe1df57a65939e to your computer and use it in GitHub Desktop.
Save cuongld2/d2fdc0a1b6edb3d11dbe1df57a65939e to your computer and use it in GitHub Desktop.
Drag from point a to point b using cypress
cy.get('canvas[class="cornerstone-canvas"]')
.trigger('mousedown', {
which:1,
force:true
}).wait(100)
.trigger('mousemove', {
x: 50,
y: 114,
which:1,
force:true
}).wait(100)
.trigger('mouseup',
{
x: 220,
y: 340,
which:1,
force:true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment