Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
Using Promise.all() in WebdriverIO

I have this problem when trying to execute this block of code for each of the categories of an array, which works when not needing to use Promise.all() to handle only one category. When executing tests, something seems to be missing because I get an error (see below).

await Promise.all(categories.map(async category => {

  // Upload file
  await orderPage.uploadFile(`data/${fileName}`);
  // Open Category dropdown menu
  await orderPage.clickElement(await orderPage.categoryMenu);
  // Select category
  await orderPage.categorySearchBar.setValue(category.name);
  await browser.keys('Enter');

}));

uploadFile() method:

async uploadFile(filePath) {

const remoteFilePath = await browser.uploadFile(filePath);

await browser.execute(() => {

  document.querySelector('input[type=file]').style.display = 'block';

});

await this.inputFile.setValue(remoteFilePath);

}

This is the error I get: Error message

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!