Is there a way in cypress to handle system alerts

26 Views Asked by At

I am trying to validate and also add input to the system alert here. Tried this code:

cy.on('window:alert',(message) =>{
            expect(message).to.includes("Please enter your password to confirm account deletion:")
        })

however the system simply stays on the alert. I also need to add value to the system text box but i have no clue how to do that (that would be the last step).

Any help would be appreciated.

0

There are 0 best solutions below