Protractor4.0.9/jasmine2/Chrome 54+:错误:超时-在jasmine指定的超时内未调用异步回调.DEFAULT_TIMEOUT_INTERVAL [英] Protractor4.0.9 / jasmine2 / Chrome 54+: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

查看:91
本文介绍了Protractor4.0.9/jasmine2/Chrome 54+:错误:超时-在jasmine指定的超时内未调用异步回调.DEFAULT_TIMEOUT_INTERVAL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经解决,但是对我来说不起作用.

我升级到protractor4.0.9/Jasmine2,chromedriver 2.25,Chrome54.

像这样的简单测试失败了:

describe('Test', () => {
    it('should go to home', () => {
      browser.get('/#/home');
      expect(browser.getCurrentUrl()).toContain('home');
    });
    it('should do something else', () => {
      expect(element(by.css('.element')).isPresent()).toEqual(true);
    });
  });

它将永远不会通过第二个规范.即使browser.get()正常工作.它在正确的路径上导航. 但最终结果是:

Running 1 instances of WebDriver
Started
...
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

在我的量角器conf上,我有:

framework: 'jasmine2',
allScriptsTimeout: 110000,
directConnect: true,
useAllAngular2AppRoots: true,

jasmineNodeOpts: {
   defaultTimeoutInterval: 400000
},

onPrepare: function () {
    browser.ignoreSynchronization = true;
    // browser.param.jasmineTimeout = 400000;
    jasmine.getEnv().DEFAULT_TIMEOUT_INTERVAL = 400000;
}

我正在使用angular 2应用进行测试.有什么主意吗?

解决方案

我目前发现的唯一解决方案是降级到Chrome53.非常欢迎任何解释或建议使其可与最新版本的Chrome一起使用./p>

I know this question have been solved but it doesn't work for me.

I upgrade to protractor4.0.9/Jasmine2, chromedriver 2.25, Chrome54.

A simple test like this is failing:

describe('Test', () => {
    it('should go to home', () => {
      browser.get('/#/home');
      expect(browser.getCurrentUrl()).toContain('home');
    });
    it('should do something else', () => {
      expect(element(by.css('.element')).isPresent()).toEqual(true);
    });
  });

it will never go through the second spec. Even though browser.get() is working. It navigates at the right path. But it ends up with :

Running 1 instances of WebDriver
Started
...
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

On my protractor conf, i have :

framework: 'jasmine2',
allScriptsTimeout: 110000,
directConnect: true,
useAllAngular2AppRoots: true,

jasmineNodeOpts: {
   defaultTimeoutInterval: 400000
},

onPrepare: function () {
    browser.ignoreSynchronization = true;
    // browser.param.jasmineTimeout = 400000;
    jasmine.getEnv().DEFAULT_TIMEOUT_INTERVAL = 400000;
}

I'm testing with an angular 2 app. Any idea?

解决方案

The only solution i found for now is to downgrade to Chrome 53. Any explanation or suggestion to make it work with latest version of Chrome are more than welcome.

这篇关于Protractor4.0.9/jasmine2/Chrome 54+:错误:超时-在jasmine指定的超时内未调用异步回调.DEFAULT_TIMEOUT_INTERVAL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆