KAK
KAK

Reputation: 915

How to create a batch file to execute Protractor config file after start the webdriver

I'm trying to create a batch file to execute my Protractor config.js file, after update & start the webdriver. And I have faced the below issues.

I tried with below batch code to update and start the webdriver,
But after the webdriver update the cmd prompt closed without starting the webdriver.

@echo on
webdriver-manager update
webdriver-manager start
protractor config.js
pause

Can anyone help me to create a batch file to start the webdriver and execute the protractor config file.

Upvotes: 1

Views: 1082

Answers (2)

Surendra Jnawali
Surendra Jnawali

Reputation: 3240

To running from batch, instead of calling webdriver-manager start just run stand alone selenium server from protractor configuration file.

webdriver-manager update --versions.standalone=3.4.0
protractor config.js

in configuration file

seleniumServerJar: 'node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar',

Upvotes: 0

Steven K. Mariner
Steven K. Mariner

Reputation: 441

If webdriver-manager is a batch or .cmd file, use the CALL command to execute it and return. Otherwise you launch the new batch file and it never comes back to yours.

call webdriver-manager update

etc.

Upvotes: 1

Related Questions