Hey all,
I must be missing something... Why is this not working for me:
var page = require('webpage').create();
page.open('
http://google.de', function(s) {
console.log(s);
var i = page.evaluate(function(j){
console.log(j);
return j;
}, 5);
console.log("test", i);
phantom.exit();
});
I get:
success
test 5
instead of:
success
5
test 5
Looking at e.g. the weather.js example (which needs to pass the address to the .evaluate function btw, I'll fix that), it uses console.log and it just works... So what am I doing wrong?