Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!