
function clickIncludeAndNext() {
  const includeBtn = [...document.querySelectorAll('button')]
    .find(b => b.offsetParent !== null && b.textContent.trim() === 'Include');
  const nextBtn = [...document.querySelectorAll('button')]
    .find(b => b.offsetParent !== null && b.textContent.trim() === 'Submit & Next');
  if (includeBtn && nextBtn) {
    lastSuccess = Date.now(); // reset timer
    includeBtn.click();
    console.log('✅ Clicked "Include"');
    setTimeout(() => {
      nextBtn.click();
      console.log('✅ Clicked "Submit & Next"');
    }, 500);
  } else {
    const elapsed = (Date.now() - lastSuccess) / 1000;
    console.log(`⏳ Waiting for buttons... (${elapsed.toFixed(1)}s since last click)`);
    if (elapsed > 5) {
      clearInterval(interval);
      console.log('✅ Done');
    }
  }
}
// Run loop every 0.2 seconds (adjust if needed)
const interval = setInterval(clickIncludeAndNext, 200);

//Stop execution:
// clearInterval(interval);

