Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

215
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda