Google 59 no longer supports embedded credentials

与世无争的帅哥 提交于 2019-12-08 03:49:33

问题


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.


回答1:


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

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