量角器。如何做拖放操作? [英] Protractor. How to do a drag and drop action?
问题描述
this.draggableFields = element.all (by.css('dnd-nodrag'));
我使用最新版本的量角器和最新版本的webdriverJS。提前感谢你的时间。
尝试这个:
ptor.actions()。dragAndDrop(
ptor.findElement(protractor.By.css('dnd-nodrag'))。get(0);
ptor.findElement(量角器.by.css('dnd-nodrag'))。get(1);
ptor.findElement(protractor.By.css('dnd-nodrag'))。get(2);
ptor .findElement(protractor.By.css('dnd-nodrag'))。get(3);
).perform();
I am currently writing a protractor test and I need to drag a drop some elements... Basically the other developers at the time used angular drag and drop to implement this functionality. I have been searching for a couple of hours but I haven't figured out yet how to get through it. This is the element I am trying to drag. Actually, there are 4 draggable elements and I want to drag the last one on the first one in order to make first the last one:
this.draggableFields = element.all(by.css('dnd-nodrag'));
I using the latest version of protractor and the latest version of webdriverJS as well. Thanks in advance for your time.
Make a try of this one :
ptor.actions().dragAndDrop(
ptor.findElement(protractor.By.css('dnd-nodrag')).get(0);
ptor.findElement(protractor.By.css('dnd-nodrag')).get(1);
ptor.findElement(protractor.By.css('dnd-nodrag')).get(2);
ptor.findElement(protractor.By.css('dnd-nodrag')).get(3);
).perform();
这篇关于量角器。如何做拖放操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!