Follow these steps to configure the protractor.
1. install npm from https://nodejs.org/download/release/npm/
2. install protractor using "npm install -g protractor"
3. install webdriver using webdriver-manager update.
4. start the selenium server using webdriver manager
webdriver-manager start
5. Now protractor will accept the configuration file (protractor.conf.js).
exports.config ={
seleniumAddress: 'http://localhost:4444/wd/hub'
jasmineNodeOpts:{
showColors: true,
defaultTimeoutInterval: 3000
}
}
6. protractor can start the selenium server if we provide the path to the selenium server standalone jar. This will slow down the overall time it takes to run the tests due to protractor having to start the server as opposed to an instance already running:
seleniumServer: './node_module/protractor/selenium/selenium-server-standalone-2.42.0.jar'
https://github.com/angular/protractor/blob/master/docs/api.md