Elementexplorer Protranslator does not show elements
I am getting started with protractor e2e tests and I spend a lot of time on the elementexplorer tool. Quite often it doesn't work as expected, as in this case:
node node_modules/protractor/bin/elementexplorer.js http://localhost:9000/#/experiment-desc
Type <tab> to see a list of locator strategies.
Use the `list` helper function to find elements by strategy:
e.g., list(by.binding('')) gets all bindings.
Getting page at: http://localhost:9000/#/experiment-desc
> element.all(by.css('.hbpreg-exdesc-samples-ul>li'))
So, I hit the Enter button and nothing happens: my cursor just jumps to a new line and apparently elementexplorer is waiting for more input. I'm trying to do this on Chrome (Chrome Developer Tools is closed). In my tests, the locator element.all(by.css('.hbpreg-exdesc-samples-ul>li'))
works fine.
Has anyone faced a similar problem?
source to share
This was fixed on October 1st and got released in Protractor 1.4.0 .
So, you need Protractor> = 1.4.0 or start using the master branch.
How to install the Transporter from the master branch
If necessary sudo
and use Protractor on a global scale:
sudo npm -g install git://github.com/angular/protractor#master
I prefer to set up a NodeJS project with package.json and point to a specific Protractor or commit version for better control:
npm init
npm install --save git://github.com/angular/protractor#ed1c75c7
mkdir -p bin
# some handy shortcuts
ln -s ../node_modules/.bin/protractor bin/p
ln -s ../node_modules/protractor/bin/elementexplorer.js bin/e
# elementexplorer sample usage
bin/e https://angularjs.org/
# Protractor binary sample usage
bin/p your-config.js
source to share