question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛 Bug]: Actions Selenium Java mouse action drag and drop not working when cursor type changes after clickandhold

See original GitHub issue

What happened?

Actions Selenium Java mouse action drag and drop not working when cursor type changes after clickandhold

How can we reproduce the issue?

Actions Selenium Java mouse action drag and drop not working when cursor type changes after clickandhold

Use case: 
1. Mouse cursor type: Pointer
2. Move to source element.
3. click and hold with mouse cursor type: changing to a rectangle block.
4. Move to target element and release.


Start Code snippet:

import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;

builder.moveToElement(fromWebElement).clickAndHold().moveToElement(toWebElement).perform()
Thread.sleep(2000);
builder.moveToElement(toWebElement).release().build().perform();


or:
builder.moveToElement(fromWebElement).dragAndDrop(fromWebElement,toWebElement).clickAndHold().build().perform();

end Code snippet:


Above different code do not work fully.
The mouse pointer moves to the source element and clicks on draggable element as i notice the cursor type change to rectangle block to confirm click and hold. 
But action of moving to the target element with draggable element does happen. 
If i manually move the mouse the cursor type changes back to pointer and i see the pointer move to target element without the draggable element.

Relevant log output

noen

Operating System

Windows Server 2019

Selenium version

Java 8

What are the browser(s) and version(s) where you see this issue?

Chrome 100

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 100.0.4896.60

Are you using Selenium Grid?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
titusfortnercommented, May 4, 2022

Drag and Drop is not working in the drivers right now, unfortunately. https://github.com/w3c/webdriver/issues/1488

0reactions
github-actions[bot]commented, Jun 4, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Actions Selenium Java mouse action drag and drop not ...
The mouse pointer moves to the source element and clicks on draggable element as I notice the cursor type change to rectangle block...
Read more >
Selenium Actions drag and drop not working on chrome browser
I tried using following to perform drag and drop and none helped: a.) builder.clickAndHold(Source).moveToElement(Destination).click(Destination) ...
Read more >
Mouse actions - Selenium
This method firstly performs a click-and-hold on the source element, moves to the location of the target element and then releases the mouse....
Read more >
Mouse Actions in Selenium Drag & Drop, Double Click, Right ...
Get up to 90% Discount on all of my courses using Dezlearn sponsored links below:Core Java : https://rebrand.ly/dezlearn- java -courseCore ...
Read more >
Handling Mouse and Keyboard Events using Actions Class ...
In this session, I have explained and practically demonstrated handling mouse and keyboard events using Actions class in Selenium.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found