I have protractor installed on windows slave machine. I am trying to run my script using node index.js
.
If I trigger job from jenkins to run above command it gives error like Protractor is not recognized as an internal or external command, operable program or batch file.
. But when I run command directly on slave machine it execute it successfully.
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Selecting an item from a combo box selenium driver
- google-drive can't get push notifications
- Selenium in Java is not finding element when using
- Failed at the electron@1.8.2 postinstall script
You can use the Jenkins NodeJS plugin(https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin) to install node and additional npm packages like protractor, grunt, etc.
After installing npm packages at global level, you can select the "Provide Node & npm bin/folder to PATH" checkbox to ensure you can run "protractor", "grunt" into shell or batch command.
Hope this helps.