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

126
Vistas
Another possibilities than wait?

I am trying to automate a website where the testing environment is reduced and the page loads nearly two minutes(120000). I don't want to use cy.wait(120000) or cy.pause() command. Could anyone help by giving more suggestions to solve the issue even the testing environment gets slower than this. I have tried should,intercept,etc..,Other than the normal ones can someone suggest me some ideas.It wil be more helpful if you post your answers with commands.

Advance Thanks for making a try to solve this.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

cy.wait is not a good practice in most situations because it just hangs your program to wait till the end of the timeout.

I think you're looking for a solution to wait for an element appears in HTML, so I'd suggest you to check this part of the document

In your case, it should be like below

cy.get('.selector', { timeout: 120000 }).should('be.visible')

Even though the timeout is longer but whenever your .selector appears on the HTML, it will pass.

Note that, the default timeout is only 4 seconds, so if you want to have more timeout, you can modify it to longer (like 2 mins for your case).

Why do we need to have timeout? Well, basically, we don't want the program hangs forever, so that's why we need to have timeout.

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