selenium & chrome 78 failing basic authentication

家住魔仙堡 提交于 2019-12-02 13:42:11

问题


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!


回答1:


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#.



来源:https://stackoverflow.com/questions/58616471/selenium-chrome-78-failing-basic-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!