In my package.json, I have scripts that open in new terminals using "start" (Windows OS only):
"automation": "start npm run webdriver:start && npm run timeout"
"webdriver:start": "webdriver-manager start",
"timeout": "timeout 3",
My question is how do I then close that terminal window once the action is complete?
I have tried the following but neither close the terminal window:
"automation": "(start npm run webdriver:start && npm run timeout) && exit"
"automation": "(start npm run webdriver:start && npm run timeout) && exit 1"
When I do just an "exit" in a Windows terminal, it does close the window but it doesn't seem to work in the script. Any help is much appreciated.
Running the following command:
npm run automation