I'm writing a test where I need to simulate a drag and drop of one element onto another but the dragging and dropping is not happening. I'm using Protractor 1.4 and chromedriver for my tests. Here's how I wrote the test:
var x = element(by.cssContainingText('span.data-dimension--text','1.05 Employment-to-population ratio'));
var targetX = element(by.css('div.chart-dimension-drop-target.chart-dimension-x'));
browser.actions().dragAndDrop(x, targetX).perform();
@sjelin can we add a test that does drag and drop from one element to another, not just by offset?
It looks like Cle-13's doing it right actually, but I'll investigate and figure out what's up
Running into the same problem
Looks like it's a problem with webdriver.
@Cle-13, are you using the drag options API?
Looks like this a known issue: https://github.com/angular/protractor/issues/583
Hi guys, sorry I've been offline for the last few weeks, did anyone find an alternative way of getting this done? What can I change to if the Protractor + ChromeDriver + HTML5 elements combination doesn't work? Thank you.
Hi @Cle-13, the bug is actually webdriver's fault. You can see a discussion of it here:
https://code.google.com/p/selenium/issues/detail?id=3604
They do talk briefly about a workaround in that issue
Hi @sjelin Was the selenium issue ever sorted for drag and drop i've been trying the past few hours to get something working but so far no luck.
I would guess that it wasn't tbh
Hi Guys, Is there any update on drag&drop event in protractor of HTML5 elements. we are facing similar issue in chrome, unable to drag&drop in protractor.
Hey Guys,
Do anyone have update on drag&drop event in protractor
Most helpful comment
Hey Guys,
Do anyone have update on drag&drop event in protractor