Search code examples
seleniumselenium-chromedriverbasic-authentication

selenium & chrome 78 failing basic authentication


In a C# program, just installed chromedriver 78.0.3904.70: Loading URLs protected by Basic Authentication is now failing.

Before chromedriver 78: Setting driver.Url = [basic-auth-url] would cause Chrome to display its Basic Auth dialog, and my C# program would block until the dialog was closed. This required manual user intervention to fill the dialog, but I could live with that.

Now, with chromedriver 78:

  1. Before setting driver.Url, its value is "data:,". This is normal.
  2. Call driver.Url = [basic-auth-url].
  3. No exception, but still, driver.Url == "data:,". The call to set driver.Url just didn't have any effect.

When the program calls driver.Url = [basic-auth-url], Chrome may display its Basic Auth dialog and then immediately hide it; I saw this once, but if it happens all the time it's too fast to see.

Ideas or workarounds? Thanks!


Solution

  • I logged a bug and got agreement that it's a bug, should be fixed in version 80. See https://bugs.chromium.org/p/chromedriver/issues/detail?id=3209 .

    It does appear to have something to do with "committed interstitials" as @pcalkins proposes in the comments, but I couldn't find a way to verifiably set Chrome's http-auth-committed-interstitials flag in C#.