Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

protractor elementExplorer

I'm trying to use protractor elementExplorer and not sure why I can't do it (I'm using Mac).

according to the documentation - http://angular.github.io/protractor/#/debugging I'm going to the protractor directory (use/local/bin) and type

node ./bin/elementexplorer.js

I'm getting the following error:

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

any help? thanks.

like image 298
user2880391 Avatar asked Feb 11 '23 02:02

user2880391


2 Answers

You need to cd into the protractor directory:

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

where node_modules in your case should be under /usr/local/lib/.

like image 135
alecxe Avatar answered Feb 13 '23 16:02

alecxe


If you have protractor installed globally as the docs at https://angular.github.io/protractor/#/ suggest you should be able to start protractor --elementExplorer anywhere and then issue commands such as browser.get('http://angular.github.io/protractor/#/ as per the api at https://angular.github.io/protractor/#/api

You can check your protractor install and version by doing protractor --version

Current verison is 3.0.0

like image 41
findlayc Avatar answered Feb 13 '23 14:02

findlayc