I cant seem to click all of the class\'s
document.getElementsByClassName(\'node closed\')[0].click();
This works but will only click on th
just remove [0] and it will access all matched elements as [0] points to first element only.