Untitled
unknown
javascript
a year ago
471 B
8
Indexable
const selector = '#nextButton'; const interval = 5000; // 5s function checkAndClickButton() { const button = document.querySelector(selector); if (button) { if (!button.disabled) { console.log('Button is enabled, clicking it...'); button.click(); } else { console.log('Button is disabled.'); } } else { console.log('Button not found.'); } } setInterval(checkAndClickButton, interval);
Editor is loading...
Leave a Comment