【问题标题】:Protractor supports Windows Authentication pop up?Protractor 支持弹出 Windows 身份验证?
【发布时间】:2016-12-15 05:54:38
【问题描述】:

有没有一种方法可以让 Protractor 支持 IE 和 Chrome 的 Windows 身份验证弹出,这不适用于我的应用程序“http://username:password@server.url/”,是否有其他方法可以处理弹出窗口。

【问题讨论】:

    标签: protractor


    【解决方案1】:

    Chrome 支持直接在 URL 中嵌入凭据,并且可以作为“http://username:password@server.url/”正常工作。

    但是 IE 不支持将其作为安全问题,因此您可能需要编写如下的 shell 脚本:

    set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.AppActivate "Windows Security"
    WshShell.Sleep 500
    WshShell.SendKeys "Username"
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys "password"
    WshShell.SendKeys "{ENTER}"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多