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

125
Visualizações
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 Respostas
Responde à pergunta

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 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