I am trying to get DOMElements and click on each of them. After that I want to run assertions on the response.
var nodes = this.evaluate(function(){
var nodes = document.querySelectorAll('.editable .action');
return nodes;
});
//Print the base URI for the node
for (i = 0; i < nodes.length; ++i) {
if(null != nodes[i]){
require('utils').dump(nodes[i].baseURI);
}
}
I have around 5 nodes that are a match, but nodes[0] is the only one that is not null. The rest are null in CasperJS. However running the same test in chrome browser I get all the nodes, none of them are null.