Javascript 量角器元件&x27;不显示元素

Javascript 量角器元件&x27;不显示元素,javascript,selenium-webdriver,jasmine,protractor,Javascript,Selenium Webdriver,Jasmine,Protractor,我开始使用量角器e2e测试,我花了很多时间在elementexplorer工具上。通常情况下,它似乎无法正常工作,例如: 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 elem

我开始使用量角器e2e测试,我花了很多时间在elementexplorer工具上。通常情况下,它似乎无法正常工作,例如:

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'))
node\u模块/量角器/bin/elementexplorer.jshttp://localhost:9000/#/experiment-描述
键入以查看定位器策略列表。
使用“list”helper函数按策略查找元素:
e、 例如,list(by.binding(“”))获取所有绑定。
获取网页地址:http://localhost:9000/#/experiment-描述
>element.all(by.css('.hbpreg exdesc samples ul>li'))
所以我点击回车按钮,什么也没发生:我的光标只是跳到新行,显然elementexplorer正在等待更多的输入。我正在chrome上尝试(chrome开发者工具已经关闭)。在我的测试中,定位器
元素.all(by.css('.hbpreg exdesc samples ul>li')
工作得非常好

有没有人面临过类似的问题

这已修复并获得

因此,您需要量角器>=1.4.0或开始使用主分支

如何从主分支安装量角器 如果您需要
sudo
并使用全局安装的量角器:

sudo npm -g install git://github.com/angular/protractor#master
我更喜欢使用package.json设置NodeJS项目,并指向特定的量角器版本或提交,以便更好地控制:

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

如果使用
元素.all()
,这种情况是否总是发生?你能详细说明一个可复制的例子(一些公共页面)吗?谢谢。本来应该是这样的,但之后可能又坏了