Google 59 no longer supports embedded credentials

2019-06-03 20:23发布

enter image description hereI 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条回答
Rolldiameter
2楼-- · 2019-06-03 20:25

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.

查看更多
登录 后发表回答