angularjs - Protractor 元素浏览器

标签 angularjs node.js debugging selenium-webdriver protractor

我正在尝试使用 Protractor elementExplorer,但不确定为什么我不能这样做(我使用的是 Mac)。

根据文档 - http://angular.github.io/protractor/#/debugging我要去 Protractor 目录 (use/local/bin) 并输入

node ./bin/elementexplorer.js

我收到以下错误:

module.js:340
throw err;
      ^
Error: Cannot find module '/usr/local/bin/bin/elementexplorer.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

有什么帮助吗? 谢谢。

最佳答案

你需要cd进入protractor目录:

cd node_modules/protractor
node ./bin/elementexplorer.js

在你的情况下,node_modules 应该在 /usr/local/lib/ 下。

关于angularjs - Protractor 元素浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28134570/

相关文章:

node.js - 如何在 express 中使用 cookieSession

javascript - 使用 Node.js 重定向到页面时出现类型错误

unit-testing - VS 11 Beta 无法启动进程,因为未提供文件名

c# - VS Code 1.19.3 调试.net core 2 总是遇到 "Only 64-bit processes can be debugged"

javascript - 简化 Javascript if 语句未定义

javascript - AngularJS - 网页未更新

javascript - 为什么 Node.js htmlparser2 在解析文档时插入额外的 Node ?

Eclipse Node.js 项目没有在断点处停止

javascript - 获取 ng-repeat 内元素的值

javascript - 如何在 create()、update() 上从 angularjs-rails-resource 获得确认或回调