webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Drag events are not emitted during actions

Open AutomatedTester opened this issue 4 years ago • 12 comments

In https://github.com/SeleniumHQ/selenium/issues/8003 we can see that drag events don't get emitted. These events are used for elements that have a draggable attribute

AutomatedTester avatar Mar 24 '20 08:03 AutomatedTester

added test in https://github.com/web-platform-tests/wpt/pull/22426

AutomatedTester avatar Mar 24 '20 22:03 AutomatedTester

@AutomatedTester Is there any update on this issue? Currently facing similar issue, where trying to drag and drop to the canvas using python actions chains but its not working.

Trying to drag source_1 to div class=react-flow__pane.

image image

Chrome version: Version 91.0.4472.114 (Official Build) (64-bit)

Any update on this bug?

satya081 avatar Mar 16 '22 22:03 satya081

Any update on this bug?

It seems to be dead (no changes for 2 years). This issue exists a lot longer than it was reported here. It's ridiculous.

bormando avatar Mar 17 '22 06:03 bormando

Any update on this?

MattKeenum avatar Jul 06 '22 22:07 MattKeenum

I've tested one more time.

https://user-images.githubusercontent.com/14884326/182072098-82b896c4-21bc-4e29-ae8f-05f03a6a71c9.mov

ActionChains(self.driver).drag_and_drop_by_offset(source_element, xoffset, yoffset).release().perform() In fact, the cursor (location of mouse) have impact on method offset().

ref-link: https://github.com/webdriverio/webdriverio/issues/6596

Vchenhailong avatar Aug 01 '22 04:08 Vchenhailong

Any update on that issues?

mkomarenko avatar Dec 17 '22 10:12 mkomarenko

I am also having this issue I have a table row that had the draggable prop on it and I am not able to drag and drop elements.

cylimaki avatar Dec 21 '22 13:12 cylimaki

Hi I have a similar problem in selenium 4.7.2 + python 3.11 and ChromeDriver 108.0.5359.71. I check "Demo 1" on the website https://www.lambdatest.com/selenium-playground/drag-and-drop-demo As I understand the problem persists for many years, is there any actual solution?

nekdan avatar Jan 05 '23 08:01 nekdan

@AutomatedTester You mentioned that you provided a test https://github.com/w3c/webdriver/issues/1488#issuecomment-603535276 but the problem still happens.

Can you clarify what is the expected status? is it fixed in some versions? If not fixed, do you have some ideas/pointers to explain in which part of codebase it should be done?

EDIT: is it that you provide a test on the WebDriver specification but each webdriver implementors need to implement the feature on their side? For instance, this issue for chrome webdriver https://bugs.chromium.org/p/chromedriver/issues/detail?id=2695 ?

apupier avatar Jan 20 '23 10:01 apupier

For geckodriver this is most likely https://github.com/mozilla/geckodriver/issues/1450.

whimboo avatar Feb 06 '23 08:02 whimboo

Add a duration to your drag. As per the specs, pointerMove has a duration parameter. Assign this 1 or 2 seconds, as some webapps won't pick up on your mouse cursor zooming at light speed across the page

https://github.com/jlipps/simple-wd-spec#perform-actions

I got this working using WebdriverIO by also adding in human-like pauses with the clicks and moving to the centre of the element: https://github.com/webdriverio/webdriverio/issues/8022#issuecomment-1473928769

bonjonbovi87 avatar Mar 17 '23 16:03 bonjonbovi87