3

I have a Protractor/Jasmine E2E Automation test that is to drag and drop a couple of collapsible panels to change the order and just verify they the elements have been moved.

I'm currently running latest versions of Protractor, Jasmine, and webdrivers (tests run in IE 11)

EDIT: Found out we're using ng-dragula to perform the drag and drops. I'm assuming protractor just isn't playing nicely with this. I'll do more digging about it, but still curious to know if there's a work around. /end edit

This function used to work, and I have since tried a handful of variations of it:

browser.actions().
   mouseMove(dragFromElement).
   mouseDown().
   mouseMove(dropToElement).
   mouseUp().
   perform();

browser.actions().
   dragAndDrop(dragFromElement, dropToElement).
   perform();

I've also tried with .getWebElement() appended to the element tag, getting each elements location and doing a mouse click, move, drop to those locations, and trying various actionSequences instead of actions().

Basically all of the above will highlight the text of the elements like it's clicking behind the panels and does not actually grab the element and drag/drop it.

Curious to know if this is a known problem or if there's a possible solution for my issue.

What i'm working with is:

<core-drag-and-drop-panel _nghost-wod-4="">
  <div class="sortable-panels" _ngcontent-wod-4="">
    <div id="elementId_10" class="draggableDiv" _ngcontent-wod-4="" aria-dropeffect="move" aria-grabbed="false">
    <div id="elementId_12" class="draggableDiv" _ngcontent-wod-4="" aria-dropeffect="move" aria-grabbed="false">
    <div id="elementId_1" class="draggableDiv" _ngcontent-wod-4="" aria-dropeffect="move" aria-grabbed="false">
 </div>
</core-drag-and-drop-panel>
d.rodriguez
  • 319
  • 6
  • 17
  • Could you check if it is IE11 specific? Same behavior in Chrome and Firefox? Thanks. – alecxe Jan 12 '17 at 16:24
  • Same issues for latest Chrome and Firefox – d.rodriguez Jan 12 '17 at 16:33
  • Shot in the dark: what if you [add a "sleep" browser action](http://stackoverflow.com/a/32872738/771848) and put the intermediate `.sleep(100)` calls in between the mouse actions? – alecxe Jan 12 '17 at 17:17
  • I assume you didn't mean to chain it because actions doesn't obtain the sleep method, but I tried individual mouse movements followed by a perform call and then a small sleep which resulted in the same issue at hand. – d.rodriguez Jan 12 '17 at 18:04

0 Answers0