量角器angular2在等待异步角度任务完成时超时

量角器angular2在等待异步角度任务完成时超时,angular,protractor,Angular,Protractor,我知道这是一个常见的问题,有很多关于它的话题,但我现在没有设法解决它。 我使用量角器5.1.2(带有Cucumber js)来测试完全成角度的应用程序。但等待失败: E/launcher - Timed out waiting for asynchronous Angular tasks to finish after 27 seconds. This may be because the current page is not an Angular application. Please se

我知道这是一个常见的问题,有很多关于它的话题,但我现在没有设法解决它。 我使用量角器5.1.2(带有Cucumber js)来测试完全成角度的应用程序。但等待失败:

E/launcher - Timed out waiting for asynchronous Angular tasks to finish after 27 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular
While waiting for element with locator - Locator: by.cssContainingText("preview-contract", "Box Internet")
我失败的一步:

this.When(/^I choose "([^"]*)" flow$/, function (flow, callback) {
    element(by.cssContainingText("preview-contract",flow)).element(by.linkText("Voir les offres")).click();
    callback();
});
这是有效的:

this.When(/^I choose "([^"]*)" flow$/, function (flow, callback) {
    browser.ignoreSynchronization = true;
    browser.sleep(10000);
    element(by.cssContainingText("preview-contract", flow)).element(by.linkText("Voir les offres")).click();
    callback();
});
和我的配置文件:

exports.config = {
baseUrl: 'http://localhost:4200/',
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
capabilities: {
    browserName: 'chrome'
},

allScriptsTimeout: 27000,
getPageTimeout : 29000,

framework: 'custom',

frameworkPath: require.resolve('protractor-cucumber-framework'),

useAllAngular2AppRoots: true,
...

我读过关于ngZone的东西,但我不是一个开发者,所以我不知道如何让它再次工作。我的配置有问题吗?

启动浏览器后,请立即尝试定义角度等待

例如:
loginPage.getPage()//启动浏览器url。

browser.waitForAngularEnabled(true)

尝试增加配置中的
allScriptsTimeout
getPageTimeout
选项,看看这是否解决了问题。将两者都增加到60000,结果相同。浏览器在预期页面打开,然后在应单击链接的位置不执行任何操作。相同的结果,相同的输出。