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

602
Visualizações
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
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