microsoft/playwright-java

[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

  1. Drag an element from side pane
  2. Perform mouse down to simulate left click operation
  3. Hover on the destination (inside canvas area)
  4. 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?

Hello,
Please find the attached image for the detailed steps.Bug1546_Reproduciblesteps.png

Kindly let me know if you need any further details.

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!