Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

216
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda