page.open('http://abc.com', function(status) {
var title = page.evaluate(function() {
console.log(test);
return document.title;
});
console.log(title);
phantom.exit();
});
Phantomjs fails with exception that test is undefined.
But if i use test through obj Object then i am able to access it.
Could anyone explain me what actually happening behind the seen.