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

594
Views
Cypress-How to jump over a code error about never found

I want to make a code to check if certain items in the list are clickable. If they are not, you want to go over them and look further in the list of other items that may be clickable. Well, I wish that when the "remove allocation" button doesn't exist, I can skip it and the code goes on.

It's about the sequence cy.contains('Remove allocation') In this moment with my code, at this line i have error "Timed out retrying after 4000ms: Expected to find element: [title="Remove Allocation"], but never found it."

 it('Find transaction for refund', function() {
  cy.wait(1500)
  for(let count=7; count<=10; count++) {
    cy.get('.text-center').eq(count).click()
    cy.wait(1500)
    if(cy.contains('Remove allocation')) {
      cy.get('.js-delete').eq(count).click()
      cy.contains('Yes').click()
      cy.wait(1000)
      cy.scrollTo(500, 0)
      count=count+1;
      cy.wait(1000)
    } else {
      count=count+1;
    }
  }
}
about 4 years ago · Juan Pablo Isaza
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!