Untitled
Anonymous
javascript
06/10/2024 12:43 PM
628 B
17
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