Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
Created August 23, 2021 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliandescottes/9510e7544de1c11ca677c9d8ab54c6c4 to your computer and use it in GitHub Desktop.
Save juliandescottes/9510e7544de1c11ca677c9d8ab54c6c4 to your computer and use it in GitHub Desktop.
Acknowledge alers on Perfherder UI
function getPageNumber() {
const previous = document.querySelector("[aria-label='Previous']");
return previous.closest("[aria-label*='Page']").getAttribute("aria-label").replace("Page ", "") * 1;
}
(async () => {
while (getPageNumber() > 1) {
document.querySelectorAll("[data-testid*='summary'].form-check-input").forEach(e => e.click())
await new Promise(r => setTimeout(r, 3000));
document.querySelectorAll('.btn-secondary [data-icon="check"]').forEach(e => e.parentNode.click())
await new Promise(r => setTimeout(r, 3000));
document.querySelector("[aria-label='Previous']").click();
await new Promise(r => setTimeout(r, 3000));
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment