Cha*_*les 16 phantomjs casperjs
如何检查casperjs脚本中的对象?
我试过console.log(arguments)但它只打印[object Arguments]或[object Object].
我希望得到类似的结果:{'firstparam':'value'...}
就像在Javascript控制台或Node.js中一样......
也许这是一个Phantomjs的问题,我不确定......
Cha*_*les 16
我想我找到了它:http://docs.casperjs.org/en/latest/debugging.html#dump-serialized-values-to-the-console
var utils = require('utils');
utils.dump({
foo: {
bar: 42
},
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6909 次 |
| 最近记录: |