Skip to content

MoveToElement and DragAndDrop is not working in Selenium C# #9148

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

Closed
Brzeczunio opened this issue Feb 5, 2021 · 1 comment
Closed

MoveToElement and DragAndDrop is not working in Selenium C# #9148

Brzeczunio opened this issue Feb 5, 2021 · 1 comment
Labels
C-dotnet .NET Bindings

Comments

@Brzeczunio
Copy link

🐛 Bug Report

MoveToElement and DragAndDrop is not working in Selenium C#

To Reproduce

When I use DragAndDrop or MoveToElement not move the element to specified target place. The element is on mouse cursor and on this coordinates will be put.

Detailed steps to reproduce the behavior:

  1. Use Actions.DragAndDrop(draggableFirst, dropZone)

Expected behavior

Move element to the target place

Test script or set of commands reproducing this issue

_driver.Navigate().GoToUrl("http://www.seleniumeasy.com/test/drag-and-drop-demo.html");

var draggableFirst =
_wait.Until(ExpectedConditions.ElementExists(
By.XPath(".//*[@id='todrag']//span[contains(text(),'Draggable 1')]")));
var dropZone = _wait.Until(ExpectedConditions.ElementIsVisible(By.Id("mydropzone")));
var actions = new Actions(_driver);
actions.ClickAndHold(draggableFirst)
.MoveToElement(dropZone)
.Release()
.Build()
.Perform();

//var a = new Actions(_driver);
//a.DragAndDrop(draggableFirst, dropZone).Build().Perform();

Environment

OS: mcOS Big Sur version 11.2
Browser: Chrome
Browser version: 88.0.4324.146
Browser Driver version: ChromeDriver 88.0.4324.9600
Language Bindings version: C# .NET 5.0

@ghost ghost added the A-needs-triaging A Selenium member will evaluate this soon! label Feb 5, 2021
@diemol diemol added C-dotnet .NET Bindings and removed A-needs-triaging A Selenium member will evaluate this soon! labels Feb 5, 2021
@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.
Labels
C-dotnet .NET Bindings
Projects
None yet
Development

No branches or pull requests

3 participants