Skip to content

Instantly share code, notes, and snippets.

@robin-drexler
Created June 12, 2022 20:40
Show Gist options
  • Save robin-drexler/e908b19432d98c3e9681eb898d8eae26 to your computer and use it in GitHub Desktop.
Save robin-drexler/e908b19432d98c3e9681eb898d8eae26 to your computer and use it in GitHub Desktop.
function sleep(ms) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, ms);
});
}
const refreshButton = document.querySelector(".ing-sn-session-button__refresh");
const downloadButtons = Array.from(
document.querySelectorAll(".button-default")
).filter((element) => element.innerText.includes("Download"));
for (const button of downloadButtons) {
button.click();
await sleep(1000);
refreshButton.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment