Cypress Tutorials - How to do drag and drop?

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 9

  • @jettigbayan4315
    @jettigbayan4315 3 года назад +1

    what if there is no defined drop zone? how can I set the drop zone in order to place the draggable element?

  • @kannu12341
    @kannu12341 4 года назад

    On actual webpage , items on left side is removed after dragging to draggable area , but that is no happening using this code . Do we had to add any other step for this??

    • @techieqa
      @techieqa  4 года назад

      Mention proper locator for from and to

    • @kannu12341
      @kannu12341 4 года назад

      I am pointing your video only ...in the video example you gave demo , acual website behaving different and your cypress test running different for item you drag and dropped

  • @tallurivamsi6413
    @tallurivamsi6413 4 года назад

    Hi Dharma,
    I have followed the same steps(installed it and added in command.js and in package.json I have added dev dependencies) , but the source item was not dragging in to destination item and its not showing any errors.
    Below is the code snippets:
    cy.get('.available-taggings>div:nth-child(1)>div>div').drag('.tagging-sequence');
    Could you please help me out on this.

    • @tallurivamsi6413
      @tallurivamsi6413 4 года назад

      data-react-beautiful-dnd-draggable does not working with cypress drag and drop command,Any Idea Please.Thank you

    • @techieqa
      @techieqa  4 года назад

      Use the mentioned plugin. Not the react one .

    • @tallurivamsi6413
      @tallurivamsi6413 4 года назад

      @@techieqa I have used the same cypress plugin,but above i was mentioning about the react component iam using.

  • @pradipvaghela3179
    @pradipvaghela3179 2 года назад

    Can you please help me with how to move multiple things? here my code doesn't add multiple items. cy.get('#todrag span').each(($el,index,$list) => {
    const ele = $el.text()
    cy.get('#todrag span').eq(index).drag('div[dropzone="move"]')
    cy.wait(2000)
    })