Closed ricogallo closed 9 years ago
I have the same issue with a manually bootstrapped angular app (without the browser.driver.wait
part):
With Protractor 1.8.0:
protractor.conf.js
onPrepare: function() {
browser.get('path/to/index.html');
},
With Protractor 2.0.0: I have to call browser.get
at the beginning of my tests, otherwise I get:
Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
We never encountered issues like #66 before.
Let me know if you want me to provide more debug info :wink:
@ricogallo can you provide your config file including onPrepare
function? We need to know if you're using jasmine 1.3 or 2 and what your onPrepare
actually looks like.
@juliemr I'm using jasmine 1.3, and my on full config is:
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
specs: [
'../e2e/**/*_test.js'
],
multiCapabilities: [
{'browserName': 'chrome'},
{'browserName': 'firefox'}
],
baseUrl: 'http://localhost:8000',
onPrepare: function() {
// https://gist.github.com/elgalu/82929eeeef4a80e01835
browser.getCapabilities().then(function(s) {
var browserName = s.caps_.browserName;
browser.isFirefox = function() {
return /firefox/.test(browserName);
};
browser.isChrome = function() {
return /chrome/.test(browserName);
};
});
browser.driver.manage().window().maximize();
browser.get('e2e/index.html');
},
jasmineNodeOpts: {
isVerbose: true
}
};
Hi @juliemr , sorry for the late reply. It seems that adding framework: 'jasmine2'
to the config file solved it! Thanks
@ricogallo Lucky you if you can switch to jasmine2
so easily! :smile:
@juliemr Should I open a dedicated new issue for our case?
@glepretre please do open a new issue, I'm closing this one. It would be helpful if you can add more information from the test output as well, since I'm not sure what is triggering the timeout.
Hi, I have a
protractor.conf.js
really similar to the one you use for login in the repo specs. I employ anonPrepare
function that invokes thebrowser.driver.get
and then there is abrowser.driver.wait
. Everything was fine until I updated to the latest version of protractor. But I've found that if I put theonPrepare
code inside my Jasmine tests (inside abeforeEach
, for instance), it works again.I guess there is an issue wrapping Jasmine?
This is my troubleshoot output.
Cheers!