1

I am working on one of the UI automation project with Karate framework. I have a scenario, where user needs to drag an element and drop it on to canvas.

Attached the Screenshot The karate doc doesn't give more information on dragging element and dropping it. Could you please help us ?

  • drag and drop IS hard. if this link doesn't help, you have to do some research or contribute code, or look for another framework: https://stackoverflow.com/a/60800181/143475 – Peter Thomas Apr 09 '21 at 10:55
  • I tried the same code given in "https://stackoverflow.com/questions/60637144/karate-ui-drag-and-drop/60800181#60800181" , code execution is passing but actually element is no dragging as expected. – Kavita Patil Apr 12 '21 at 06:53
  • And retry(30).highlight('.inline-block') * delay(4000) * script("var myDragEvent = new Event('dragstart'); myDragEvent.dataTransfer = new DataTransfer()") * waitFor('.inline-block').script("_.dispatchEvent(myDragEvent)") * script("var myDropEvent = new Event('drop'); myDropEvent.dataTransfer = myDragEvent.dataTransfer") * script('#canvasContainer > div.drag-activity-section.compass-icon', "_.dispatchEvent(myDropEvent)") And retry(30).highlight("#canvasContainer > div.drag-activity-section.compass-icon") * delay(4000) – Kavita Patil Apr 12 '21 at 06:56
  • sorry can't help you any more, all the best – Peter Thomas Apr 12 '21 at 07:21
  • :) please help, could you please enhance the karate UI tool for this requirement ? – Kavita Patil Apr 12 '21 at 09:49
  • nope. this is open source. maybe you can convince a friend or someone else to do this for you – Peter Thomas Apr 12 '21 at 10:56

0 Answers0