相关文章推荐
俊逸的萝卜  ·  How do get my player ...·  1 年前    · 
道上混的草稿纸  ·  一神论_百度百科·  2 年前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report

Hello! I am using ChromeDriver version 85.0.4183.8700. When I have chrome opened and there is a proxy authentication alert opened (screenshot attached), when I execute code
Driver.SwitchTo().Alert().SetAuthenticationCredentials("username", "password");
If I execute this code, I just get a timeout after 10 seconds (even if alert is there):

var wait = new WebDriverWait(acc.Wb.Driver, new TimeSpan(0, 0, 10));
IAlert alert = wait.Until(ExpectedConditions.AlertIsPresent());

This throws exception
{"no such alert\n (Session info: chrome=85.0.4183.102)"}
Is this a problem that chrome driver has or selenium? Am I doing something wrong?
Thanks!

To Reproduce

Any way of interacting with the Authentication Alert box will fail.

Expected behavior

Driver should set credentials.

Test script or set of commands reproducing this issue

Driver.SwitchTo().Alert().SetAuthenticationCredentials("username", "password");
If I execute this code, I just get a timeout after 10 seconds (even if alert is there):

var wait = new WebDriverWait(acc.Wb.Driver, new TimeSpan(0, 0, 10));
IAlert alert = wait.Until(ExpectedConditions.AlertIsPresent());

Environment

OS: Windows 10
Browser: Chrome
Browser version: Version 85.0.4183.102 (Official Build) (64-bit)
Browser Driver version: Chrome driver 85.0.4183.8700
Language Bindings version: C#

Take a look at Jim Evans Authentication process, I think it explains the problem you are having

https://jimevansmusic.blogspot.com/2019/05/handling-authentication-requests-with.html
https://jimevansmusic.blogspot.com/2019/05/handling-authentication-requests-part1.html
https://jimevansmusic.blogspot.com/2019/05/handling-authentication-requests-part2.html
https://jimevansmusic.blogspot.com/2019/05/handling-authentication-requests-part3.html
https://jimevansmusic.blogspot.com/2019/07/handling-authentication-requests-epilogue.html