拖放元素

时间:2018-08-14 11:53:43

标签: jasmine protractor

使用量角器和Firefox,我要使用以下元素拖放元素:

const plot0 = element(by.id('AnalyseErrors'));
browser.actions().dragAndDrop(plot0, {x: 70, y: 70}).mouseDown().mouseMove({x: 10, y: 10})
    .mouseMove({x: 10, y: 10})
    .mouseMove({x: 10, y: 10})
    .mouseMove({x: 10, y: 10})
    .mouseMove({x: 10, y: 10})
    .perform();

我也尝试

browser.actions().dragAndDrop(plot0, {x: 70, y: 70}).perform();

我什至尝试:

const element0 = element(by.id('AnalyseErrors')).getWebElement(); // This is the element to move
const element1 = element(by.css('body > app-root > div > ng-component > div > div.editor-container')).getWebElement(); // This is the content zone to drop the element

browser.actions()
  .dragAndDrop(element0, element1).
  perform();

该元素位于侧栏上,我必须选择它,然后使用鼠标将其拖放到内容区域。

不幸的是不起作用。   -失败:POST / session / 875dc0ad-4d29-4bff-9efc-98e4d05379f4 / moveto与已知命令不匹配

你知道为什么吗?

0 个答案:

没有答案
相关问题