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

156
Vistas
Cypress, test visiting a blocked link

I am trying to visit a link that is blocked for the user. I simply use the cy.visit() function to do this. My problem now is that the site, as it should, isn't loading the page but waits a whole minute until it fails. enter image description here

And I'm searching for a solution that doesn't include decreasing the pageLoadTimeout.

So is there a way to check if the page isn't loading (blocked)? I tried to solve it with .should() and {timouts} but haven't found a solution to my problem.

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

0

Try using request instead of visit,

cy.request('myurl', { failOnStatusCode: false})
  .then(response => {
    expect(response.status).not.to.eq(200)
  })
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