I'm delving into the world of Protractor tests for AngularJS.
All the tutorials recommend I execute the following after webdriver-manager update
and prior to executing the test:
webdriver-manager start
According to the webdriver-manager
man, the start
command will 'start up the selenium server'. True enough, once I run the above command, I can see something at http://127.0.0.1:4444/wd/hub
My questions is: is the above necessary?
I currently run my tests without the above command.
All I do is:
webdriver-manager update
php -S localhost:8000 -t dist/
protractor ./test/protractor.config.js
My tests run as expected even though I've excluded webdriver-manager start
.
Can someone please explain why webdriver-manager start
is necessary?
:EDIT:
My protractor/fooTests.js:
exports.config = {
directConnect: true,
capabilities: {
'browserName': 'chrome'
},
specs: ['protractor/fooTests.js'],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
};
My protractor/fooTests.js:
describe('test for the bar code', function() {
it('should login', function() {
browser.get('http://localhost:8000');
element(by.model('password')).sendKeys('123456');
element(by.css('[type="submit"]')).click();
});
it('should inspect element ', function() {
expect(element(by.id('foo-script')).isPresent()).toBe(true);
console.log('Login Success');
});
});