selenium: Drag and drop does not work properly in chrome (remote within docker container and locally via chromedriver)
Meta -
OS: Archlinux Selenium Version: ruby gem selenium-webdriver 3.9 Browser: Chrome Browser Version: Google Chrome 63.0.3239.132 Chromedriver version: ChromeDriver 2.33
Otherwise in Docker: latest selenium/chrome-standalone-debug
Expected Behavior -
When I run:
driver.action.drag_and_drop(draggable, droppable).perform
It should move the mouse to the droppable
element and release the mouse button. Then the two elements should switch order.
Actual Behavior -
When I run:
driver.action.drag_and_drop(draggable, droppable).perform
The mouse is not moved. The Ghost for the element currently being dragged is at the position, where the mouse was before I ran the tests. Release is not working either.
(When I configure the VNC viewer to send pointer events, the dragging is still going on, following the mouse if I move into the vnc viewer window.)
Steps to reproduce -
I wrote a script for reproduction here:
https://gist.github.com/leoc/1837a0d1066fba1fd5649dc9dd196f5b
I attached screenshots to the gist to show the situation before the drag_and_drop
invocation and after. Unfortunately scrot
does not capture the mouse pointer of my local system. But the situation is the same locally as it is within the docker container. The mouse is not moved, but click and hold
seems to have been started dragging, thus chrome displays the dragged element at the position where the mouse was earlier, before the method invocation.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (4 by maintainers)
@yearnath Please provide a test case to reproduce the issue.
Fixed in dbe5d01c93b54958c3955b36f5166a3f704b74c1.