//I am not a js programmer, but this seemed simple enough. Didn't come across anything for it (since I needed it).. Hopefully it's useful for others. //SORRY... Fixed the count issue, unsure why I had put count.length! var count = document.getElementsByClassName('btn small js-actionAccept').length; for (i = 0; i < count; i++) { document.getElementsByClassName('btn small js-actionAccept')[i].click(); }