Protractor4.0.9 / jasmine2 / Chrome 54+: Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

…衆ロ難τιáo~ 提交于 2020-01-05 06:53:42

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/40238648/protractor4-0-9-jasmine2-chrome-54-error-timeout-async-callback-was-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!