Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

puppeteer example multiple file upload

  await page.waitForSelector('input[type="file"]')
  const files = await Promise.all([`${filePath}/travis_1.png`, `${filePath}/travis_2.png`])
  const input = await page.$('input[type="file"]')
  if (fileExists) {
    await input.uploadFile(...files)
  }
 
PREVIOUS NEXT
Tagged: #puppeteer #multiple #file #upload
ADD COMMENT
Topic
Name
6+9 =