Here is my conf file:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'phantomjs',
'phantomjs.binary.path': 'C:/Users/MY_USER_NAME/AppData/Roaming/npm/node_modules/phantomjs/phantomjs.exe'
},
specs: ['example_spec.js'],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
};
And here is my example_spec.js file
describe('angularjs homepage', function() {
it('should greet the named user', function() {
browser.get('http://www.angularjs.org');
element(by.model('yourName')).sendKeys('Julie');
var greeting = element(by.binding('yourName'));
expect(greeting.getText()).toEqual('Hello Julie!');
});
});
When I run it, I always get an error:
Error: Timed out waiting for page to load
Wait timed out after 10129ms
If I switch to testing only chrome, it works fine, but I can't get phantomjs to work. I have the latest build of both phantomjs and the protractor just installed.
source
share