I grab all elements by a specific class name like below:
var button = document.getElementsByClassName('submit')
I would like to iterate through what is retrieved and click on all buttons with that class name. I tried something like
for(var i in button){
i.click()}
But that does not seem to work. How would I go about clicking each button that is retrieved?