I want to iterate over the tr on a table using casper, but i cannot get the counter inside the evaluate function, i tried replacing the variable with a fixed number and it works.
var i =0;
for(i=1;i<amount;i++) {
var identifier = this.evaluate(function(i) {
return $("#div_identifiers_result > tr:nth-child("+i+") > td:nth-child(1)").parent().data('name');
});
this.echo(identifier ,'info');
how can i make the scope inside evaluate to see that i counter?