硒和chrome 78无法通过基本身份验证 [英] selenium & chrome 78 failing basic authentication

查看:62
本文介绍了硒和chrome 78无法通过基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#程序中,刚安装的chromedriver 78.0.3904.70:现在无法加载受基本身份验证保护的URL.

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

在chromedriver 78之前:设置driver.Url = [basic-auth-url]将导致Chrome显示其基本身份验证"对话框,而我的C#程序将阻塞,直到关闭该对话框.这需要用户手动干预才能填充对话框,但我可以接受.

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.

现在,使用chromedriver 78:

Now, with chromedriver 78:

  1. 在设置driver.Url之前,其值为"data :,".这是正常的.
  2. 致电driver.Url = [basic-auth-url].
  3. 没有例外,但driver.Url =="data :,".设置driver.Url的调用没有任何作用.

当程序调用driver.Url = [basic-auth-url]时,Chrome可能会显示其基本身份验证"对话框,然后立即将其隐藏;我曾经看过一次,但是如果一直发生,那就太快了.

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!

推荐答案

我记录了一个错误,并同意它是一个错误,应该在版本80中修复.请参见

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 .

它确实与提交的插页式广告"有关,就像@pcalkins在评论中建议的那样,但是我找不到一种可验证地设置Chrome的http-auth-committed-interstitials的方法在C#中标记.

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

这篇关于硒和chrome 78无法通过基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆