Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!