> casper.then(function () {
> this.evaluate(function() {
> console.log($('.foobar').css());
> });
> });
If you want to print JSON serialized stuff right from within
evaluate(), you can do:
this.evaluate(function() {
__utils__.echo(JSON.stringify($('.foobar').css(), null, 4));
});
But you can also do it from the casper env as well:
casper.then(function() {
require('utils').dump(this.evaluate(function() {
return $('.foobar').css();
}));
});
This is untested though, as jQuery may return complex, unserializable objects.
++
--
Nicolas Perriault
https://nicolas.perriault.net/
Phone: +33 (0) 660 92 08 67