【发布时间】:2014-11-12 21:42:24
【问题描述】:
我开始使用量角器 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'))
所以我点击了 Enter 按钮,但没有任何反应:我的光标只是跳到新行,显然 elementexplorer 正在等待更多输入。我正在 chrome 上尝试(Chrome 开发人员工具已关闭)。在我的测试中,定位器element.all(by.css('.hbpreg-exdesc-samples-ul>li')) 工作得非常好。
有没有人遇到过类似的问题?
【问题讨论】:
-
这是否总是发生然后你使用
element.all()?您能否详细说明一个可重现的示例(一些公共页面)?谢谢。
标签: javascript selenium-webdriver jasmine protractor