I am trying to run my Protractor test from command line using package.json.
My package.json looks like below -
{
\"name\": \"ProtractorFramework\",
Prabodh you can't chain the selenium server startup command and the test execute command.
webdriver-manager start
start up a Selenium Server and will output a bunch of info logs. Your Protractor test will send requests to this server to control a local browser. Leave this server running.
When you run webdriver-manager start
selenium server will run in the command prompt. This command prompt can't be closed if you close it then selenium server will be quit.
Instead you can create a script that will open a new command prompt and run the webdriver-manager start
command like
"scripts": {
.....
"wdstart":"start cmd /k webdriver-manager start timeout 10 && npm run protractor"
......
}