Javascript: Automatically clicking a button? Javascript: Automatically clicking a button? google-chrome google-chrome

Javascript: Automatically clicking a button?


document.getElementsByClassName("button2 redColor")[0].click();

You need select index, because getElementsByClassName return the array