Untitled

 avatar
unknown
plain_text
2 months ago
332 B
123
Indexable
var Data = document.querySelectorAll('button');

for (let i = 0; i < Data.length; i++) {
  try {
    // Check if the button’s text is exactly "Add"
    if (Data[i].innerText.trim() === 'Add') {
      Data[i].click();
      console.log("Add CLICKED");
    }
  } catch (err) {
    console.error("Error clicking button:", err);
  }
}
Editor is loading...
Leave a Comment