-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed as not planned
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intendedJ-staleApplied to issues that become stale, and eventually closed.Applied to issues that become stale, and eventually closed.
Description
What happened?
During the call of Actions.dragAndDrop, if the mouse cursor changes, Selenium will stop in the action and wait for the draggable element to be touched again to continue.
I would like Selenium to complete the drag and drop, independantly of the cursor hypothetical state.
How can we reproduce the issue?
<head>
<style>
#draggable {
background-color: orange;
width: 100px;
height: 100px;
border-radius: 5px;
}
#dropzone {
background-color: gray;
width: 150px;
height: 150px;
border-radius: 5px;
position: relative;
}
</style>
</head>
<body>
<div id="draggable" draggable="true"><p>Draggable</p></div>
<div id="dropzone" ondrop="dropHandler(event)" ondragover="dragoverHandler(event)"><p>Drop Zone</p></div>
<script>
function dragStartHandler(ev) {
ev.dataTransfer.setData("text/plain", ev.target.id);
}
function dragoverHandler(ev) {
ev.preventDefault();
ev.dataTransfer.dropEffect = "move";
}
function dropHandler(ev) {
ev.preventDefault();
const data = ev.dataTransfer.getData("text/plain");
const draggableElement = document.getElementById(data);
if (ev.target.id === "dropzone") {
ev.target.appendChild(draggableElement);
}
}
window.addEventListener("DOMContentLoaded", () => {
const element = document.getElementById("draggable");
element.addEventListener("dragstart", dragStartHandler);
element.addEventListener("dragend", dragEndHandler);
});
</script>
</body>
Java code:
// i let you create the driver
driver.navigate().to("path/to/file.html");
WebElement draggable = driver.findElement(By.id("draggable"));
WebElement dropZone = driver.findElement(By.id("dropzone"));
new Actions(driver)
.dragAndDrop(draggable, dropZone)
.perform();
// will not moveRelevant log output
noneOperating System
Windows 10
Selenium version
Java 4.20.0
What are the browser(s) and version(s) where you see this issue?
MSEdge v.112.0.1722.48
What are the browser driver(s) and version(s) where you see this issue?
MSEdgeWebDriver-11.0.1722.48
Are you using Selenium Grid?
No
baflQA, M1troll and Neutrino666
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intendedJ-staleApplied to issues that become stale, and eventually closed.Applied to issues that become stale, and eventually closed.