我正在测试登录和注销功能,下面是我的测试用例
it('should redirect to login page on click of logout',function(){
signInPage.email.sendKeys('zahid.afaque@meltwater.com');
signInPage.password.sendKeys(1234);
signInPage.loginButton.click();
expect(browser.getCurrentUrl()).toMatch(/\/collections/);
signInPage.profileImage.click();
signInPage.logout.click();
browser.waitForAngular();
expect(browser.getCurrentUrl()).toMatch(/\/login/);
});
当我在上面运行测试它失败时,下面是错误消息
Error: Timed out waiting for Protractor to synchronize with the page after 11001ms. Please see https://github.com/angular/protractor/blob/master/docs/faq.md
我尝试使用browser.waitForAngular();
,但没有帮助。当我删除期望"expect(browser.getCurrentUrl()).toMatch(/\/login/);"
时,它就通过了。任何人都遇到过同样的问题,任何帮助都是appricated