Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dragAndDrop work and doesn't work with Java and Chrome #8624

Closed
v3g3t4x opened this issue Aug 11, 2020 · 3 comments
Closed

dragAndDrop work and doesn't work with Java and Chrome #8624

v3g3t4x opened this issue Aug 11, 2020 · 3 comments

Comments

@v3g3t4x
Copy link

v3g3t4x commented Aug 11, 2020

馃悰 Bug Report

Simple drag and drop snippet of code doesn't work with Chrome.

To Reproduce

You can find here code that works on a demo site and a code that doesn't work in other site, what's the issue?
In both case I am using a RemoteWebDriver:

		localDriver = new RemoteWebDriver(new URL(currentHub), capability);
		localDriver.manage().timeouts().implicitlyWait(30000, TimeUnit.SECONDS);
		localDriver.manage().window().maximize();

SITE AND CODE WORKS
Demo site URL: http://demo.guru99.com/test/drag_drop.html

		WebElement elementFrom=driver.findElementByXPath("//*[@id='credit2']/a");
		WebElement elementTo=driver.findElementByXPath("//*[@id='bank']/li");			
		Actions dragAndDrop = new Actions(localDriver);
		Action  action      = dragAndDrop.dragAndDrop(elementFrom, elementTo).build();
		action.perform();			

SITE AND CODE DOESN'T WORK
Demo site URL: https://www.seleniumeasy.com/test/drag-and-drop-demo.html

		WebElement elementFrom=driver.findElementByXPath("//div[@id='todrag']//span[1]");
		WebElement elementTo=driver.findElement(By.id("mydropzone"));
		Actions dragAndDrop = new Actions(localDriver);
		Action  action      = dragAndDrop.dragAndDrop(elementFrom, elementTo).build();
		action.perform();			

##Notes

In both case the code is the same and xpath are valid and correct, I am confused why in the second case doesn't work?
Are there some constrains around webelement type or xpath used or html page structure?

Environment

OS: Docker Container
Browser: Chrome
Browser version: all version (tested sure on 77/80/84)
Language Bindings version: Java 1.8

@ghost ghost added the needs-triaging label Aug 11, 2020
@v3g3t4x v3g3t4x changed the title dragAndDrop not works with Java and Chrome dragAndDrop doesn't work with Java and Chrome (>59) Aug 11, 2020
@v3g3t4x v3g3t4x changed the title dragAndDrop doesn't work with Java and Chrome (>59) dragAndDrop work and doesn't work with Java and Chrome Aug 12, 2020
@v3g3t4x
Copy link
Author

v3g3t4x commented Aug 12, 2020

Updated with new info and 2 cases.

@Bioshock667
Copy link
Contributor

Greetings @v3g3t4x
I was able to replicate the same issue on my machine and here is what I found.
To the best of my knowledge, the Selenium Java client library is formatting the "Actions" request correctly before sending to the driver server.
The issue appears to be related to ChromeDriver issue 2695 and GeckoDriver issue 1450.
From these issues, its seems that both drivers do not support the HTML5 Drag-and-Drop API.

@AutomatedTester can you triage this as a Chromedriver and GeckoDriver related issue?

@AutomatedTester
Copy link
Member

Duplicate of #8003

@AutomatedTester AutomatedTester marked this as a duplicate of #8003 Feb 17, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants