In my app i when i try to check the login functionality chrome shows its in build alert box requesting for password
it('1 Should start out with empty username and password field',() => {
expect(element.all(by.css('.text-input')).get(0).getAttribute("value")).toEqual("");
expect(element.all(by.css('.text-input')).get(1).getAttribute("value")).toEqual("");
});
it('2 should fail with Wrong credentials', () => {
element.all(by.css('.text-input')).get(0).sendKeys("Spider Man");
expect(element.all(by.css('.text-input')).get(0).getAttribute("value")).toEqual("Spider Man");
element.all(by.css('.text-input')).get(1).sendKeys("Bat man");
expect(element.all(by.css('.text-input')).get(1).getAttribute("value")).toEqual("Bat man");
element(by.id('logInButton')).click();
element.all(by.css('.text-input')).get(0).clear();
element.all(by.css('.text-input')).get(1).clear();
})
it('3 should login with Right credentials', () => {
element.all(by.css('.text-input')).get(0).sendKeys("neeraj");
expect(element.all(by.css('.text-input')).get(0).getAttribute("value")).toEqual("neeraj");
element.all(by.css('.text-input')).get(1).sendKeys("123456");
element(by.id('logInButton')).click();
browser.driver.navigate().refresh();
});
I don't want that additional popup to raise up it looks something like this
您需要将服务器配置为不需要身份验证,或使用服务器进行不需要的身份验证。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.