Skip to content

Instantly share code, notes, and snippets.

@vickyRathee
Created May 1, 2020 12:58
Show Gist options
  • Save vickyRathee/dd4286d1f4947554fcd9fded88bd99dd to your computer and use it in GitHub Desktop.
Save vickyRathee/dd4286d1f4947554fcd9fded88bd99dd to your computer and use it in GitHub Desktop.
Click on submit button multiple times. similar to await btn.click({ clickCount: 3 }) in puppeteer. https://www.agenty.com/docs/scraping-agent/crawling-password-protected-website-online
var clicked = 0;
var timer = setInterval(() => {
var element = document.querySelector('#submit');
if (!element || clicked > 3)
{
clearInterval(timer);
}
else{
element.click();
clicked++;
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment