I am a QA analyst with some JS knowledge and am using Selenium Webdriverjs for some automation. The site requires username/password, so it was designed using the embedded credentials to login (https://user:password@address.com). However, with the recent update to Chrome 59 this week, this ability is no longer allowed, even as a configuration change. Does anyone know how to handle the authentication box that appears when you reach a site that requires it? I have tried treating it as an alert box and do not believe it is a modal window. Any help would be greatly appreciated.
There is a nice hack mentioned by a SO user zoonabar in this SO post. If you hit a resource/URL with valid credentials , before actually hitting the URL that needs credentials, then browser caches the authentication and then you can use it. Please see his answer.
This has also been discussed here - SO Post about Basic Authentication.
Another option is to run a transparent proxy to inject the header with the required credentials- mentioned by Florent B in the same link mentioned above.
In our case, Option 1 (by zoonabar) worked out. You can also try his hack.
来源:https://stackoverflow.com/questions/44443375/google-59-no-longer-supports-embedded-credentials