0

I have url https://dc1-common.naops.exu.xxxx.se/cgi-bin/index.pl and after entering I got another url https://dc1-common.naops.exu.xxxx.se with Sign In Browser pop up which requires for Authentication

I tried with https://username:[email protected]/cgi-bin/index.pl , it does not work

If I convert url to http than it works . Please provide the solution for https based url which requires

1
  • 1
    Satya, when you say it doesn't work, can you describe what you mean? Does it spit out an error somewhere describing why it doesn't work?
    – corsiKa
    Commented Jan 24, 2019 at 17:48

2 Answers 2

0

Doing basic auth via the url isn't supported by most browsers these days and once the pop up happens, now the Operating System has control of the browser and your browser-based tests can't do anything. A few options come to mind:

IF this is a site you control (or your company) controls you can try disabling the authentication:

  1. Whitelist your IP so you don't have to login
  2. Set a cookie bypass

If you don't have control of this site:

  • You can try making an API call in your test with the correct headers / authentication. Return the authenticated session and then proceed with your test.

I had a similar problem and was able to use option 1 which involved whitelisting the IP addresses of the AWS machines I run my tests on. Option 2 was also a possibility.

0

This guy properly explains why you can't do that anymore -

“Say goodbye to URLs with embedded credentials” by Leonid Makarov https://link.medium.com/eSAHV8Sfq7

PS: you might want to use https://rungutan.com instead. They support a "login" property for your logic of having "different URL" that can help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.