量角器未被识别为内部或外部命令,可操作程序或批处理文件 [英] Protractor is not recognized as an internal or external command, operable program or batch file

查看:128
本文介绍了量角器未被识别为内部或外部命令,可操作程序或批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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.

推荐答案

我遇到了同样的问题

  1. 在jenkins中,安装npm install -g量角器后,只需转到存在量角器和webdriver文件的相同目录
  2. 就像在构建环境中一样> cd然后转到相同目录
  3. 运行带有附加节点的命令,例如

节点webdriver-manager启动 节点量角器保存config.js的路径"

node webdriver-manager start node protractor "path where config.js" is kept

此解决方案对我有用!!祝您自动化

This solution works for me!! Happy Automating

这篇关于量角器未被识别为内部或外部命令,可操作程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆