I'm confused as to why the following casper code would both produce a false result...
The eobDocuments is a global variable (var eobDocuments at start of script) and is produced by the following function:
function findLinks() {
var map;
map = Array.prototype.map;
return map.call(document.querySelectorAll('tr.app_list_row1, tr.app_list_row2'), function(row)
{
columns = row.querySelectorAll('td');
url = columns[0].querySelectorAll('a')[0].href;
date = columns[0].querySelectorAll('a')[0].innerText.replace(/\//g,".");
type = columns[1].innerText;
language = columns[2].innerText;
return {date: date, type: type,language: language, page_url: url, pdf_url: null };
});
}
casper.then(function() { eobDocuments = this.evaluate(findLinks); });
Any help would be appreciated. Maybe I'm just not understanding some javascript fundamentals here or something..
Thanks,