Selenium WebDriver - handling authentication popups in Chrome and Edge



  • We have an internal web application that I am trying to automate using Selenium and BrowserStack, in C#.

    I have managed to use BrowserStack's 'local' functionality to get at the application but I'm now hitting a basic authentication popup (see below for a similar example):

    authentication popup

    I don't encounter this when running it locally (as it'll just pick up my own credentials).

    I've done some scouting around on here and elsewhere and seen this sort of question asked many times. However, many answers are old and revolve around the "http://user:password@[address]" approach which is now deprecated in Chrome 59+ (I'm using 80). I also plan on executing tests in MS Edge.

    Any ideas on a more modern solution? I've seen custom Chrome extensions mentioned. Is this the only viable solution for this scenario? Is there an equivalent for MS Edge?



  • This is normally done by injecting authorization headers into the outgoing packets. However BrowserStack seems not having this feature in their nearest roadmap.

    enter image description here



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2