我是新來casperjs,是沒有得到執行功能casperjs評價不執行
casper.start('https://piedmont.taleo.net/careersection/2/moresearch.ftl?lang=en',function(){
casper.page.injectJs('/Users/manoj/apply_robots/jquery/jquery-2.1.4.min.js');
this.echo(this.getTitle());
this.wait(3000,processPage);
this.echo("before processPage");
});
function processPage()
{
this.echo("inside processPage");
var c = [];
c = this.evaluate(getJ);
this.echo(c);
}
function getJ(){
this.echo("inside getJ");
var jobs = [];
var names = $('table#requisitionListInterface\\.listRequisition tr[id$=row]');
__utils__.echo(names);
for (var i = 0, row; row = names[i]; i++) {
var $p = $.parseHTML(row.cells[1].innerHTML);
}
jobs.push(names);
return names.length;
}
的可能重複的[從調用時消息未出現評估方法](http://stackoverflow.com/questions/25135598/message-does-not-appear-when-called-from-評估方法) –