Cypress .trigger commands with mousedown, mousemove & mouseup do not work Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Cypress Custom TypeScript Command is not a FunctionCypress - wait for xhr request which triggered by UI operationCypress.$ in command overwritecy.request does not work from Cypress plugin file?Cypress custom commands not recognizedcypress custom find commandTrying to make Cypress, TypeScript and IstanbulJS work togetherHow to go to custom commands implementation in Cypress?Passing an object into a Cypress cy.setcookie() CommandHow exactly do before and beforeEach work in Cypress?

How would this chord from "Rocket Man" be analyzed?

Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?

What is it called when you ride around on your front wheel?

Additive group of local rings

How to get even lighting when using flash for group photos near wall?

What is the term for a person whose job is to place products on shelves in stores?

Does the set of sets which are elements of every set exist?

Can I criticise the more senior developers around me for not writing clean code?

Passing args from the bash script to the function in the script

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?

PIC mathematical operations weird problem

How to count in linear time worst-case?

Is it acceptable to use working hours to read general interest books?

Did the Roman Empire have penal colonies?

Expansion//Explosion and Siren Stormtamer

Could moose/elk survive in the Amazon forest?

What to do with someone that cheated their way through university and a PhD program?

How to translate "red flag" into Spanish?

Where did Arya get these scars?

c++ diamond problem - How to call base method only once

My bank got bought out, am I now going to have to start filing tax returns in a different state?

Are these square matrices always diagonalisable?

Why did C use the -> operator instead of reusing the . operator?



Cypress .trigger commands with mousedown, mousemove & mouseup do not work



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Cypress Custom TypeScript Command is not a FunctionCypress - wait for xhr request which triggered by UI operationCypress.$ in command overwritecy.request does not work from Cypress plugin file?Cypress custom commands not recognizedcypress custom find commandTrying to make Cypress, TypeScript and IstanbulJS work togetherHow to go to custom commands implementation in Cypress?Passing an object into a Cypress cy.setcookie() CommandHow exactly do before and beforeEach work in Cypress?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















Is there some secret method to get this working?



We are using the draggable library to do this in the UI.



https://github.com/Shopify/draggable/tree/master/src/Draggable



I am trying to drag one column to the next using the Cypress automation runner.



This is my code:



cy.get(dataExplorerTableAttributeDraggable)
.eq(0)
.trigger('mousedown', which: 1 );
cy.get(dataExplorerTableAttributeDraggable)
.eq(1)
.trigger('mousemove')
.trigger('mouseup');


Executing this code has no visible result whatsoever.



Also tried this:



cy.get(dataExplorerTableAttributeDraggable)
.eq(2)
.trigger('mousedown', which: 1 )
.trigger('dragstart', )
.trigger('drag', );
cy.get(dataExplorerTableAttributeDraggable)
.eq(0)
.trigger('dragover')
.trigger('drop')
.trigger('dragend')
.trigger('mouseup');


I must make it clear that I need the automation to actually DO the drag & drop, not just trigger events.



What am I missing?










share|improve this question






























    0















    Is there some secret method to get this working?



    We are using the draggable library to do this in the UI.



    https://github.com/Shopify/draggable/tree/master/src/Draggable



    I am trying to drag one column to the next using the Cypress automation runner.



    This is my code:



    cy.get(dataExplorerTableAttributeDraggable)
    .eq(0)
    .trigger('mousedown', which: 1 );
    cy.get(dataExplorerTableAttributeDraggable)
    .eq(1)
    .trigger('mousemove')
    .trigger('mouseup');


    Executing this code has no visible result whatsoever.



    Also tried this:



    cy.get(dataExplorerTableAttributeDraggable)
    .eq(2)
    .trigger('mousedown', which: 1 )
    .trigger('dragstart', )
    .trigger('drag', );
    cy.get(dataExplorerTableAttributeDraggable)
    .eq(0)
    .trigger('dragover')
    .trigger('drop')
    .trigger('dragend')
    .trigger('mouseup');


    I must make it clear that I need the automation to actually DO the drag & drop, not just trigger events.



    What am I missing?










    share|improve this question


























      0












      0








      0








      Is there some secret method to get this working?



      We are using the draggable library to do this in the UI.



      https://github.com/Shopify/draggable/tree/master/src/Draggable



      I am trying to drag one column to the next using the Cypress automation runner.



      This is my code:



      cy.get(dataExplorerTableAttributeDraggable)
      .eq(0)
      .trigger('mousedown', which: 1 );
      cy.get(dataExplorerTableAttributeDraggable)
      .eq(1)
      .trigger('mousemove')
      .trigger('mouseup');


      Executing this code has no visible result whatsoever.



      Also tried this:



      cy.get(dataExplorerTableAttributeDraggable)
      .eq(2)
      .trigger('mousedown', which: 1 )
      .trigger('dragstart', )
      .trigger('drag', );
      cy.get(dataExplorerTableAttributeDraggable)
      .eq(0)
      .trigger('dragover')
      .trigger('drop')
      .trigger('dragend')
      .trigger('mouseup');


      I must make it clear that I need the automation to actually DO the drag & drop, not just trigger events.



      What am I missing?










      share|improve this question
















      Is there some secret method to get this working?



      We are using the draggable library to do this in the UI.



      https://github.com/Shopify/draggable/tree/master/src/Draggable



      I am trying to drag one column to the next using the Cypress automation runner.



      This is my code:



      cy.get(dataExplorerTableAttributeDraggable)
      .eq(0)
      .trigger('mousedown', which: 1 );
      cy.get(dataExplorerTableAttributeDraggable)
      .eq(1)
      .trigger('mousemove')
      .trigger('mouseup');


      Executing this code has no visible result whatsoever.



      Also tried this:



      cy.get(dataExplorerTableAttributeDraggable)
      .eq(2)
      .trigger('mousedown', which: 1 )
      .trigger('dragstart', )
      .trigger('drag', );
      cy.get(dataExplorerTableAttributeDraggable)
      .eq(0)
      .trigger('dragover')
      .trigger('drop')
      .trigger('dragend')
      .trigger('mouseup');


      I must make it clear that I need the automation to actually DO the drag & drop, not just trigger events.



      What am I missing?







      typescript cypress






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 5 at 14:34







      Steve Staple

















      asked Mar 22 at 15:56









      Steve StapleSteve Staple

      73121132




      73121132






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I have even faced the similar issue; only tweak which helped me was setting - clientX: 505, clientY: 357






          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)





          FYI., you have to listen to the browser events and set these details. More details here - https://developers.google.com/web/tools/chrome-devtools/console/events



          Also, I think this will run only on fixed viewport. Please see if this helps.






          share|improve this answer























          • Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

            – Steve Staple
            Apr 5 at 14:36












          • I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

            – Kondasamy Jayaraman
            Apr 6 at 15:37











          • I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

            – Steve Staple
            Apr 8 at 9:08











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55303476%2fcypress-trigger-commands-with-mousedown-mousemove-mouseup-do-not-work%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          I have even faced the similar issue; only tweak which helped me was setting - clientX: 505, clientY: 357






          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)





          FYI., you have to listen to the browser events and set these details. More details here - https://developers.google.com/web/tools/chrome-devtools/console/events



          Also, I think this will run only on fixed viewport. Please see if this helps.






          share|improve this answer























          • Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

            – Steve Staple
            Apr 5 at 14:36












          • I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

            – Kondasamy Jayaraman
            Apr 6 at 15:37











          • I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

            – Steve Staple
            Apr 8 at 9:08















          1














          I have even faced the similar issue; only tweak which helped me was setting - clientX: 505, clientY: 357






          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)





          FYI., you have to listen to the browser events and set these details. More details here - https://developers.google.com/web/tools/chrome-devtools/console/events



          Also, I think this will run only on fixed viewport. Please see if this helps.






          share|improve this answer























          • Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

            – Steve Staple
            Apr 5 at 14:36












          • I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

            – Kondasamy Jayaraman
            Apr 6 at 15:37











          • I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

            – Steve Staple
            Apr 8 at 9:08













          1












          1








          1







          I have even faced the similar issue; only tweak which helped me was setting - clientX: 505, clientY: 357






          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)





          FYI., you have to listen to the browser events and set these details. More details here - https://developers.google.com/web/tools/chrome-devtools/console/events



          Also, I think this will run only on fixed viewport. Please see if this helps.






          share|improve this answer













          I have even faced the similar issue; only tweak which helped me was setting - clientX: 505, clientY: 357






          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)





          FYI., you have to listen to the browser events and set these details. More details here - https://developers.google.com/web/tools/chrome-devtools/console/events



          Also, I think this will run only on fixed viewport. Please see if this helps.






          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)





          cy.get(etlWidget)
          .trigger('mouseover')
          .trigger('mousedown', which: 1)
          .trigger('mousemove', clientX: 505, clientY: 357)
          .xpath(PageElements.workflow.x_initial_drop_target_area)
          .trigger('mousemove')
          .trigger('mouseup', force: true)






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 4:09









          Kondasamy JayaramanKondasamy Jayaraman

          487412




          487412












          • Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

            – Steve Staple
            Apr 5 at 14:36












          • I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

            – Kondasamy Jayaraman
            Apr 6 at 15:37











          • I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

            – Steve Staple
            Apr 8 at 9:08

















          • Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

            – Steve Staple
            Apr 5 at 14:36












          • I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

            – Kondasamy Jayaraman
            Apr 6 at 15:37











          • I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

            – Steve Staple
            Apr 8 at 9:08
















          Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

          – Steve Staple
          Apr 5 at 14:36






          Kondasamy Jayaraman - I did not make it clear - I need my automation test to actually DO the drag & drop, not just trigger events.

          – Steve Staple
          Apr 5 at 14:36














          I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

          – Kondasamy Jayaraman
          Apr 6 at 15:37





          I'm not sure, if you have tried the script I have recommend. This actually does drag and drop.

          – Kondasamy Jayaraman
          Apr 6 at 15:37













          I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

          – Steve Staple
          Apr 8 at 9:08





          I am trying to use it with a slight modification:cy.get('@dragThis') .trigger('mouseover') .trigger('mousedown', which: 1 ) .trigger('mousemove', clientX: 505, clientY: 357 ) .get('@dropzone') .trigger('mousemove') .trigger('mouseup', force: true );

          – Steve Staple
          Apr 8 at 9:08



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55303476%2fcypress-trigger-commands-with-mousedown-mousemove-mouseup-do-not-work%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript