Cypress doesnt open application login popup and instead throws 401 unauthorized directly

151 views Asked by At

Its a simple code: cy.visit("https://example.com/Booking/lists");

Hitting on this by browser internally redirects to "integrated authentication" which throws windows based login popup. This works fine when done manually from any browser like chrome/edge enter image description here

However, when its done using cypress script then instead of the login pop up the browser immediately displays 401 - Unauthorized enter image description here

One suspection which I observe is that when browser is launched by cypress then remote address is send as 127.0.0.1:49898 for the internal API hit However when I launch the browser manually then remote address is 10.20.120.40:443.

Is there anyway I can make cypress launch the browser with similar kind of setting/env as if launched manually ?

I expect login popup to be shown so that I can enter credentials using AutoIT script

0

There are 0 answers