TestCafe如何在Internet Explorer中验证Active Directory Windows安全性提示

问题描述 投票:0回答:1

对我正在测试的网站的身份验证通过Active Directory(AD)进行。通常,您从网站URL重定向到活动目录页面,该页面如下所示:

enter image description here

以上是在Chrome,FireFox和Edge上的外观。使用“角色”登录非常有效。

但是,这在Internet Explorer上不起作用。在IE上,而不是重定向到页面,系统将提示您以下Windows安全提示

enter image description here

我尝试使用httpAuth进行身份验证,但是没有运气:

fixture `Login Tests`
    .page `https://myurl.com`

test
    .httpAuth({
        username: "myusrename",
        password: "mypassword", 
        domain: 'MYDOMAIN'
    })("Sign in with valid credentials successfully signs in", async t => {
        await t
            .expect(Selector("title").innerText).eql("ExpectedTitle")
});

以上测试在使用所有其他浏览器时都有效(使用角色时:

test("Sign In with valid credentials successfully  logs in", async t => {
        await t
            .useRole(validAccount)
            .expect(Selector("title").innerText).eql("HRCore")
});

[在IE中运行测试时,相对于自己打开IE并导航到URL而言,没有出现提示。在TestCafe IE实例中,我看到的只是一个空白网站(重定向到AD URL)。

testing active-directory e2e-testing testcafe ui-testing
1个回答
0
投票

因此,将域添加到httpAuth是罪过。只需删除域即可解决问题...

© www.soinside.com 2019 - 2024. All rights reserved.