go to protractor confiuration and add this
onPrepare: function() {
// implicit and page load timeouts
browser.manage().timeouts().pageLoadTimeout(40000);
browser.manage().timeouts().implicitlyWait(25000);
// for non-angular page
browser.ignoreSynchronization = true;
// sign in before all tests
}
It worked for me
my full config file looks like this...
// conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../**/*.e2e.js'],
multiCapabilities: [{
browserName: 'firefox'
}],
onPrepare: function() {
// implicit and page load timeouts
browser.manage().timeouts().pageLoadTimeout(40000);
browser.manage().timeouts().implicitlyWait(25000);
// for non-angular page
browser.ignoreSynchronization = true;
// sign in before all tests
}
}
What actually happens is that you ask from protractor to wait for an amount of time and ignnore the document.ready(), in order to give you time to bootstrap angular manually.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…