Handling Azure Active Directory login - can't handle "Stay signed in" window with cy.origin #28042
Unanswered
Senpuria
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I've ran into a bit of trouble using cy.origin trying to login to Azure Active Directory (login.microsoftonline.com). I've been following the docs here https://docs.cypress.io/guides/end-to-end-testing/azure-active-directory-authentication however the docs don't go through handling the "stay signed in" window that could appear after entering a Username and Password.
This is fine, since it's just an extra click, however after following the docs, I CANNOT get it to perform an extra click after submitting the password.
The function is as follows:
`function loginViaAAD(username: string, password: string) {
cy.visit('/')
)
}`
As you can see, quite simple and essentially copy and pasted from the cypress docs. Apart from we never hit that second click, cypress is expecting a new URL which I would assume it is expecting it to be the original URL for our product.
Am I doing something wrong here? I would expect to be able to perform as many actions as I want before it jumps out of the function but it doesn't seem to be doing so.
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions