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

252
Vistas
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 Respuestas
Responde la pregunta

0

You could use Promise.all:

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