我正试图在本地Windows开发机器上启动量角器。为了做到这一点,我尝试使用以下命令从命令行启动它:
C:\myProject\node_modules\grunt-protractor-runner\node_modules\protractor\bin>webdriver-manager start当运行该命令时,我会得到一个错误,即:
'webdriver-manager' is not recognized as an internal or external command,
operable program or batch file.不过,我确信这是正确的。我正在通过NPM安装量角器。我的package.json文件如下所示:
{
"name": "MyProject",
"version": "0.0.1",
"description": "Just the description",
"repository": "N/A",
"readme":"N/A",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"devDependencies": {
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "0.4.0",
"grunt-contrib-connect": "0.7.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-jshint": "0.9.2",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-watch": "0.5.x",
"grunt-protractor-runner": "0.2.4",
"grunt-start-webdriver":"0.0.2",
"phantomjs": "1.9.7-3",
"selenium-webdriver":"2.41.0",
"load-grunt-tasks": "0.2.x",
},
"license": "none"
}我做错了什么?为什么我不能让量角器运行?谢谢!
发布于 2014-05-10 13:08:32
webdriver实际上是一个NodeJS脚本。使用
node webdriver-manager start发布于 2015-03-31 20:56:23
全球范围内安装量角器。
npm install protractor -g这将安装protractor和webdriver-manager。然后从命令行运行:webdriver-manager update,查看有关:http://angular.github.io/protractor/#/tutorial的更多信息
发布于 2015-03-31 12:39:25
尝试将它作为管理员全局安装:
npm install -g webdriver-managerhttps://stackoverflow.com/questions/23580315
复制相似问题