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

256
Visualizações
How to apply waitForExist() on two selector simultaneously in webDriverIO

Currently, I am upgrading the WebDriverIo version from 4 to 5 wherein one of the existing tests we are applying waitForExist on two selectors simultaneously. In v4 it's like this .waitForExist(selector + loadingSelector, null, true) But in V5 waitForExist chaining to selector and therefore I've refactored this to await (sel1+loadingSelector).waitForExist(0,true,null); but this throwing error `TypeError: (selector + loadingSelector).waitForExist is not a function

Here is my bit of command code:

addIdeCommand('ideOpenFolder', async function (folder, treeCls, fuzzy) {
    var sel1 =await browser.$(sel1);
    var loadSelector = await browser.$(sel2);
    

        await sel1.waitForDisplayed();
        // Wait for the loading icon to disappear (true = not exists)
       **await (selector+loadSelector).waitForExist(0,true,null);**
        await this.waitUntil(async function () {
            //something
        });
});

Can someone please help me with how to apply waitForExisting() on multiple selectors at the same time?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You could use Promise.all:

await Promise.all([
  method1,
  method2,
  ...
])
about 4 years ago · Juan Pablo Isaza Relatório
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