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

367
Vistas
Cypress - click on element when not disabled

I have an anchor in an Angular app which is disabled until the page content loads, which takes some time. Is there any way to click it only after it stops being disabled?

I tried with:

const myItems = cy.get('whatever-selectors');
myItems.contains('some text', {timeout: 10000}).should('not.be.disabled').click();

This doesn't work.

The documentation states that Cypress will retry clicking until the should condition is fulfilled or the timeout is exceeded, but it fails after less than half the time.

Any suggestions?

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

0

You should apply the timeout: 10000 with cy.get()

cy.get('whatever-selectors', {
    timeout: 20000
}).should('be.enabled').click();
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