Rayrun
← Back to Discord Forum

drag and drop a file

Hello,

Is there an example somewhere of how I can drag and drop a file with Playwright? The file is stored in a 'resource' folder in my project, so I probably have to create a buffer with it and then pass it to the dragTo playwright helper?

This thread is trying to answer question "How can I drag and drop a file with Playwright?"

2 replies
tphillips8117

Is drag and drop a feature of the app or the web browser?

I found this post and worked for me, it uses dispatchEvent: https://charliedigital.com/2021/12/20/simulate-drag-and-drop-of-files-with-playwright/

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.