Last active
April 9, 2020 11:38
-
-
Save xoelop/ee48624245ae763632fc18365c2ae534 to your computer and use it in GitHub Desktop.
JS code to click every element in a page with the same class name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var className = 'your-class-name'; // Replace your-class-name with the class name of the elements you want to click | |
var elements = Array.from(document.getElementsByClassName(className)); | |
elements.map(x => x.click()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment