You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Use Actions.DragAndDrop(draggableFirst, dropZone)
Expected behavior
Move element to the target place
Test script or set of commands reproducing this issue
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
The text was updated successfully, but these errors were encountered:
🐛 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:
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
The text was updated successfully, but these errors were encountered: