所以我开始使用量角器,我想调试我的测试代码:
describe('stuff', function(){
it('should find the specs item, and its empty', function(){
browser.debugger();
gotoHome();
var allItems = element.all('li in model.tags');
var specsDashboardElement;
for (var i=0 ; i < allItems.length; ++i) {
var elem = allItems[i];
var text = elem.findElement(by.css('.li-title').getText()); // does this even work?? dunno
if (text == "Specs")
specsDashboardElement = elem;
}
expect(specsDashboardElement.isDisplayed()).toBe(true);
});
});
我跟着these instructions,但这是我在node.js调试器控制台上看到的输出:
D:\ src \ apps \ j1-test.module>量角器调试conf.js <调试器侦听端口5858连接... ok中断C:\ Users \ j \ AppData \ Roaming \ npm \ node_modules \ protractor \ lib \ cli.js:7 5 *命令行选项中的值会覆盖配置中的值 . 6 * / 7'使用严格'; 8 9 //这里需要咖啡来启用以咖啡脚本编写的配置文件 . debug> cont <------------------------------------ <PID:9756(capability:chrome#1 )<------------------------------------ <debugger侦听端口5858 debug>
那个's it. no matter how many types I type '续,没有任何反应 .
我已经尝试按照WebStorm中的调试说明进行操作,结果大致相同(在WebStorm调试控制台上输出:
“C:\ Program Files \ nodejs \ node.exe”--debug-brk = 2259 C:\ Users \ j \ AppData \ Roaming \ npm \ node_modules \ protractor \ lib \ cli.js conf.js debugger listen on port 2259 PID:2708(能力:chrome#1)调试器侦听端口2259
) .
我在Windows 8上使用节点0.10.26(64位)
想法有人吗?
1 回答
这是一个量角器问题,现在应该修复:
“修复工作 - 应该在下一个版本发布 . 感谢您的耐心,大家 . ” - @juliemr
来自GitHub issue #552
EDIT: 发布于0.20.0版本! (Windows用户为0.20.1) . 见Protractor changelog .