问题
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