there are some button share the same id or class that casperjs cant classify, i want to click on the second or N selector match, i can do it with:
document.querySelectorAll('[id="something"]').click();
but i have to do it with the following basic format:
casper.then(function (){
this.click(id="something");
});
or. is there anyway i can make the following statement work?
var clickthis= '[id="something"]';
document.querySelectorAll(clickthis).click();
the var clickthis is working in casper.click, but cant work in document.querySelector
thanks!