-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(codegen): basic drag'n drop support #27985
Conversation
This comment has been minimized.
This comment has been minimized.
45682bf
to
3b09717
Compare
@@ -349,6 +372,8 @@ class RecordActionTool implements RecorderTool { | |||
return true; | |||
if (nodeName === 'INPUT' && ['date'].includes((target as HTMLInputElement).type)) | |||
return true; | |||
if (target.draggable && nodeName !== 'A') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check requires further thinking. It made these tests fail:
[chromium] › library/inspector/cli-codegen-1.spec.ts:653:7 › cli codegen › should await popup ──
[chromium] › library/inspector/cli-codegen-2.spec.ts:200:7 › cli codegen › should download files
images/links with a src/href are draggable by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave it a try and cherry-picked your code on top of my PR #28767, and those tests pass. You can take a look at:
https://github.com/ruifigueira/playwright/tree/feat/record-drag-drop
Keep in mind that I changed the way recorder works: it no longer consumes events and performs actions via playwright while recording. This makes the recording experience more natural and, at least until now, I didn't notice any strange behaviour because of those changes (all tests are passing, as you can check in my PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meanwhile I reverted most of the changes in the PR (it could be solved with a one-liner), but that branch still has them.
Test results for "tests 1"15 flaky26060 passed, 609 skipped Merge workflow run. |
Action items:
|
Could I ask how long it would take for this functionality to be added? I have asked before but I really need this to work on my application. |
We also really need this to work. |
@mxschmitt ,we can reference the rrweb(https://www.rrweb.io/) about drag'n drop recording |
Closing for now, since this was an experiment and it has proven that it was not that trivial to implement. We might re-visit this feature request in the future and unfortunately can't commit on any eta. |
#19892