Skip to content

[Question] How to drag and drop files  #10667

Open
@A-ZC-Lau

Description

@A-ZC-Lau

How do I write a drag and drop action with a file?

There's an example in the docs that I don't understand

// Note you can only create DataTransfer in Chromium and Firefox
const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
await element.dispatchEvent('dragstart', { dataTransfer });

How do I select a file to drag and drop?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions