mirror of
https://github.com/hanzoai/puppeteer.git
synced 2026-09-24 17:02:14 +00:00
391 B
391 B
Files
Currently, Puppeteer does not offer a way to handle file downloads in a programmatic way.
For uploading files, you need to locate a file input element and call ElementHandle.uploadFile.
const fileElement = await page.waitForSelector('input[type=file]');
await fileElement.uploadFile(['./path-to-local-file']);