Cypress code-snippet#1- Drag and Drop feature

cy.get(dragloc)        .trigger('mousedown', { button: 0 })        .wait(1500)        .trigger('mousemove', {               clientX: 357.75,               clientY: 682.25,               screenX: 1811.75,               screenY: 799.25,               pageX: 682.25,               pageY: 105.8125           })         .trigger('mouseup', { force: true });˝
  1. Create a reusable function in commands.js file and call it in spec file as below:
cy.dragAndDrop(dragloc, droploc, 0, 0);

--

--

--

Extensive international experience having worked in UK and Asia (India & Malaysia) in a wide variety of tools- Selenium, Appium, Protractor & Cypress.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Compiling Qt with Docker multi-stage and multi-platform — Docker Blog

How To Choose The Perfect No-Code Platform

What if the next Steve Jobs was a refugee ?

What “volatile” does in C (and C++)

add-migration : The term ‘add-migration’ is not recognized…

How to choose the right EC2 types for application service work loads

When should you automate your software tests? | Agilitest blog

Deep Dive: Covalent Technology Overview

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
VinayakTitti-Technical QA

VinayakTitti-Technical QA

Extensive international experience having worked in UK and Asia (India & Malaysia) in a wide variety of tools- Selenium, Appium, Protractor & Cypress.

More from Medium

Why Test Automation Tool with Runtime License is Evil?

Run Cypress tests in Cross-browser Using the testing tool LambdaTest

Playwright test framework PageObject oriented

When is testcase automation required?