New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML5 dragging does not always work on Chrome #583
Comments
There's some webdriver weirdness around drag and drop - let's pass these along to the webdriver team. Which browser are you using? |
I use Chrome latest version. Did you raise an error report to the webdriver team? Or do I still have to do it ? |
I have a set of webdriver-related things to look into - I'll add it to my list and take care of it. |
I found an issue in selenium https://code.google.com/p/selenium/issues/detail?id=3604 Looks like it is the same problem. |
The mouse movements seem to work for both the dragAndDrop and chained mouseDown mouseMove actions. But none of the HTML5 drag events (dragstart, dragend, dragover, dragenter, dragleave, and drop) are firing. This is using the Chrome driver. |
@juliemr Looks like this issue still exists. I am not able to drag and drop an element in chrome browser. The same code works fine in firefox. If you can help me it would be really great. |
Ditto. Drag and drop working fine in Firefox but not in Chrome. |
I'm having the same problem - Protractor 1.3.1 - Chrome 37.0 - Firefox - 28. Using the following code to drag and drop browser.actions().dragAndDrop(slider, {x: amountX, y: amountY}).perform(); On 22 August 2014 16:08, cristover-lopes notifications@github.com wrote:
|
@hankduan Let's make a test case without using Protractor and add to https://github.com/juliemr/webdriver-bugs |
Is this test case necessary. It seems like it's a known issue documented here: https://code.google.com/p/selenium/issues/detail?id=3604 |
Yup, good call. Known issue: https://code.google.com/p/selenium/issues/detail?id=3604 |
Still facing this problem on Chrome driver. |
Im new to the Protractor -- i have to automate the drag and drop ptor = protractor.getInstance(); |
I have the same problem. I simplified at the maximum the code to see if something was wrong in accessing the elements. However, when I execute the test, it seems like only mouseover events are fired, since tooltips are shown at the start and end points of the drag. browser.actions()
.mouseMove({x: 500, y: 300})
.mouseDown()
.mouseMove({x: -500, y: 0})
.mouseUp().perform();
browser.sleep(3000); Note: I fixed the window size so the coordinates of the code are correct. Is there any update on this issue? |
Same issue here! |
Same issue was this ever resolved? |
+1 need a solution |
+1 |
Is this the root issue? |
I guess so |
But it does not work in firefox either for me. I tried every code I found on the internet, without any luck... |
It worked for my coworker on Firefox, but not Chrome. Specifics: protractor version: 2.5.1 The test just drags the element 100 pixels down and drops it. We wanted to use pixels in our case because our drag&drop simply reorders an element within the same parent. The test drags the first item in a list, verifies that the dragged element is still visible, and verifies that the first element is now something else. code:
|
FYI, @EvanBurbidge says he got drag and drop working in Chrome&protractor: #123 (comment) We haven't tried this approach, since you can't use it to drag a certain number of pixles. You can only use it to drop it into a different element. |
This is still an issue as of Selenium 2.53.1. I found that using mouse actions seems to work ok with drag and drop implementations that use mouse events, but the HTML5 drag and drop events are not firing. So, confusingly, drag and drop works some of the time, and not if you're trying to use HTML5 events. |
Hello everyone. |
I used browser.wait and inside that, I keep calling dragAndDrop with an
exit condition that the drag happened. Please note that a small time out
works.
I used that approach from my finding that if I call dragAndDrop multiple
times, the drag works (through repl).
On Feb 15, 2017 7:59 AM, "Christian Martins" <notifications@github.com> wrote:
Hello everyone.
I am facing the exact same issue. Any information about a possible fix?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#583 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADkYpOmZCl92QN_R9jej8KtGrri2lOyoks5rcvbCgaJpZM4BnVpH>
.
|
@zakirhere can you please post an example? |
Resolved Working code:
but offsetX & offsetY not working for me |
@LibuMathew This works awesome!!! |
@LibuMathew you are a genius!!! thanks!!!! 👏 |
Hi, everyone! I also had the same issue but with Firefox browser. Many actions such as DnD, right mouse button click, .etc don't work when running test in Firefox. Here is my implementation of these actions: https://github.com/IgorSasovets/protractor-firefox-support . Now I'm still working on it, but there are some methods that can be used for writing e2e tests using protractor. |
Following test case:
The test does not seem to drag the map. There is also no drop possible with the following test page: http://html5demos.com/drag that seems the same problem.
The drag and drop does even not work with mouseevents:
The text was updated successfully, but these errors were encountered: