I'm currently writing end-to-end-tests using protractor. With the selenium standalone server I'd like to run them on different browsers (on a win10-vm). Chrome works perfectly fine, but firefox constantly throws the following error:
Failed: Error while waiting for Protractor to sync with the page: [ng:test] no injector found for element argument to getTestability
The problem is, that this error doesn't occur always and also on different tests.
I did a lot of research and tried various rootElement approaches, such as:
'rootElement' = 'html'
'rootElement' = '[ng-app]'
'rootElement' = '.className'
But they don't work.
However, I found a workaround, using a browser.sleep()
after I reload the page (which I do before each test). The problem might be that the ng-app
isn't already set in my html tag when protractor continues after the page reload.
Because my workaround slows down the testing process in also isn't totally reliable I would prefer another solution. Can someone help me?
My config file:
exports.config = {
seleniumAddress: 'http://myAddress',
specs: ['mySpecs.js'],
framework: 'jasmine2',
rootElement:'html',
multiCapabilities: [{
'browserName': 'firefox'
},{
'browserName': 'chrome'
}]
};
Thanks a lot, MH