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

151
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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