测试受密码保护的URL在硒中的设置是什么

What are the settings to test a password protected URLin Selenium?

本文关键字:设置 是什么 URL 密码保护 测试      更新时间:2023-09-26

'wdio.conf.js"文件中是否有一种方法或设置,以便可以使用它来对受密码保护的URL进行自动化测试。

找到了在 wdio.conf.js 文件中使用特殊 URL 格式作为基本 URL 的解决方案,如下所示: http://username:password@example.com/- 这将发送标准 HTTP"授权"标头中的凭据。

参考:https://serverfault.com/questions/371907/can-you-pass-user-pass-for-http-basic-authentication-in-url-parameters