Click on a specific text
var items = document.body.getElementsByTagName("*");
for (var i = 0; i < items.length; ++i) {
if (items[i].textContent == "the button text") {
items[i].click();
console.log("clicked", i)
} else {
console.log("loop",i)
}
}
Comments
0 B
|π
/π