测试开始失败,Timed out等待异步Angular任务完成原因

时间:2017-11-25 12:25:32

标签: angularjs protractor

我的测试开始失败的原因是“超时等待异步Angular任务完成原因”。以前完美运行的相同测试。我保证没有代码更改。 我有50秒的等待时间(   allScriptsTimeout:50000,   getPageTimeout:50000,)。我是一个角度应用程序,我不想使用browser.ignoresynchronization。 我用的是茉莉花版2.8.0。

代码如下:

logout.page:

get el() {
return $('userbarforlogout');
}

get menu() {
return $('dropdown');
}

get logoutLink() {
return this.menu.$('logout');
}

async logout() {
await this.el.click();
await this.logoutLink.click();
}

spec文件:

describe('logout action', function() {

it('should logout', async function() {
let ac1 = new logout();
await ac1.logout();
}); 
});

有什么建议真的很感激吗?

由于

0 个答案:

没有答案
相关问题