Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

With protractor and firefox, I can´t drag and drop an element #4921

Open
carodrigues opened this issue Aug 14, 2018 · 3 comments
Open

With protractor and firefox, I can´t drag and drop an element #4921

carodrigues opened this issue Aug 14, 2018 · 3 comments

Comments

@carodrigues
Copy link

carodrigues commented Aug 14, 2018

With protractor and firefox (61.0.2), I want to drag and drop an element with this:

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();
I also try
browser.actions().dragAndDrop(plot0, {x: 70, y: 70}).perform();

I even try:
const element0 = element(by.id('AnalyseErrors')).getWebElement(); // this is the elemet 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();

The element is located on a side bar, i have to select him and, with the mouse , dragg and drop to a content zone.

Unfortaly doesn't work. - Failed: POST /session/875dc0ad-4d29-4bff-9efc-98e4d05379f4/moveto did not match a known command

Do you know why?

If use Chrome, i don´t have this error but the dragAndDrop doesn´t work too.

@IgorSasovets
Copy link
Contributor

Hi, @carodrigues ! It occurs due to issues with actions class operations support. Take a look at protractor-firefox-support. I use it in everyday activity and it helps me a lot) Hope, it'll help you too) Also, take a look at similar issues:
#4177
#4687
#4725

@carodrigues
Copy link
Author

carodrigues commented Aug 16, 2018

Thank you @IgorSasovets.

I'm working on the implementation of "protractor-firefox-support", but, as i'm new with protractor, i'm facing some problems.

Do you have a compete example?

with the example: performDnD isn´t found and is missing a ';'

@IgorSasovets
Copy link
Contributor

Hi, @carodrigues ! You can find complete example in test suite.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants