0

I am using selenium webdriver to access a website. driver.get("http://user:password@samplewebsite");

Two authentications are required for accessing the site. First authentication works since I have given user:password@samplewebsite

But the second authentication popup is for another site. eg: https://samplesite2

How to handle this multiple authentication problem.

Could someone let me know whether there is any solution for such issues.

Shamnad P S
  • 1,095
  • 2
  • 15
  • 43

2 Answers2

0

Did you try with alert.authenticateUsing() method in Alert. I hope it may help you.

You may see the link below too:

Webdriver - HTTP authentication dialog

Community
  • 1
  • 1
optimistic_creeper
  • 2,739
  • 3
  • 23
  • 37
0

For my solution, if there are two authentications.

Authenticate the second one first.

driver.get("http://user:password@samplewebsite2");

Then call the required url.

driver.get("http://user:password@samplewebsite1");
Shamnad P S
  • 1,095
  • 2
  • 15
  • 43