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

202
Vistas
Two new urls but second one missing path variable in Cypress

Maybe a bit difficult to explain but I have the following issue. I have created a link and Cypress wants to click it, but it seems to click it twice. The second time the path variable is missing (the ID of an incident) and now it stores 'undefined' as incident ID, while the ID is '458868'

Does anyone why it calls this URL twice and why the second time the incident ID is missing in the URL?

The step definition is:

cy.get('.html-link').click({force:true});

Thanks!! enter image description here

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

0

It's unlikely the .click() is happening twice. More likely the 2nd call to /incidents is just part of the page load, same as call to /incidents before the click.

To check it out, put in a long wait before clicking, see if the order of logging changes.

"it stores 'undefined' as incident ID" - please clarify where it's being stored - on the server, or in the test via an intercept?

If you are using an intercept, it's matcher needs to be more specific.

about 4 years ago · Juan Pablo Isaza Denunciar

0

I think i have solved the issue:

@Fody said to add a wait in the step.

cy.get('.html-link').wait(1000).click({force:true});

Although i'm not a fan of waits, in this case it seems to work. Thanks.

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