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

143
Visualizações
Cypress - How to handle basic auth pop-up after click

I'm working on the automation of a ticket sales page for soccer matches. The web is in pre-production and for this reason it asks me for a basic auth when accessing to the page.

That's why when accessing I do the following command:

cy.visit('https://user:pass@tickets.demo.com/')

But currently the client has added another basic auth that appears in the payment gateway after pressing the pay button with a simple click.

In the previous version of the project, he magically ignore the pop-up and kept going, but recently I migrate to the latest version of Cypress and now the project crashes when I reach that step with an Authentication error. How can I handle it?

Researching a bit I have seen the following code but it only works after a visit command, but I need after a click.

cy.visit('your url', {
 auth: {
  username: 'enter username',
  password: 'enter password,          
 },
})

Old Cypress: 9.5.1 New Cypress: 10.8.0 Node: 8.13.2

almost 4 years ago · Santiago Trujillo
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