As API document mentioned, browser.visit() will invoke the callback with (e, browser, status) parameters, but I always get undefined in following code snip. Did I write it wrong?
function test(title)
{
(function (theTitle){
var browser = new Browser();
browser.visit(url, function (e, b, st) {
console.log("e :"+e + ", b :"+b + ", st :" + ", title :"+ theTitle) ; // e, b, st are undefined instead of null, browser ...
console.log( browser.html() ); // works
console.log( b.html() ); // TypeError: Cannot call method 'html' of undefined, if comment out first log.
});
}
)(title);
}
var titles[] = { ... }
for(var i in titles) test(titles[i]);
PS,
"name": "zombie",
"version": "2.0.0-alpha25"