[Bug]: Drag and drop in a canvas is not working in playwright
Closed this issue · 4 comments
Version
1.42.0
Steps to reproduce
Below manual mouse operations are performed
- Drag an element from side pane
- Perform mouse down to simulate left click operation
- Hover on the destination (inside canvas area)
- Drop the element inside canvas by performing mouse up operation
Expected behavior
Element to be dragged and dropped inside canvas
Actual behavior
Could not see any action in the UI
I understand the mouse movements and other actions will be simulated inside the browser but this making the debugging also difficult
Additional context
Locator source = page.locator("xpath");
source.hover();
page.mouse().down();
//destination
page.locator("#canvas area").hover(new Locator.HoverOptions().setPosition(x,y));
page.mouse().up();
Environment
-Windows 10
-Chrome v 123.0.6312.106
Element to be dragged and dropped inside canvas
Can you share complete reproduction so that we could try it locally?
We need unfortunately something which we can run locally, otherwise there is no way for us to reproduce issues like this. Websites and testing suites are highly complex systems, hence replicating them is not feasible.
Please re-file and provide a self-contained reproduction, which we can run locally to reproduce your issue. Thanks for your understanding!