I'm using CasperJS to automate some web stuff. I want to select all the li in a list and pick a specific li from that list based off information contained within it. I then want to click on a link within the selected li. After getting to the page I want, I have the following code:
casper.then(function() {
var nodes = this.evaluate(function(){
var li_nodes = document.querySelectorAll('ul#merchants li');
return Array.prototype.map.call(lis, function(e) {
return e;
});
});
});
That's not giving me back an array of nodes though. If instead I have:
return e.innerText
I get text back, but that doesn't help me much.