问题描述
我在Windows从属计算机上安装了量角器.我正在尝试使用node index.js
运行脚本.如果我从jenkins触发作业以运行上述命令,则会出现类似Protractor is not recognized as an internal or external command, operable program or batch file.
的错误.但是,当我直接在从属计算机上运行命令时,它会成功执行它.
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.
推荐答案
我遇到了同样的问题
- 在jenkins中,安装npm install -g量角器后,只需转到存在量角器和webdriver文件的相同目录
- 就像在构建环境中一样> cd然后转到相同目录
- 运行带有附加节点的命令,例如
节点webdriver-manager启动节点量角器保存config.js的路径"
node webdriver-manager startnode protractor "path where config.js" is kept
此解决方案对我有用!!祝您自动化
This solution works for me!! Happy Automating
这篇关于量角器未被识别为内部或外部命令,可操作程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!