Created
February 13, 2021 17:17
-
-
Save AndersDJohnson/f015e258d311aed903c0f8cd7bcb46e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
const $ = document.querySelector.bind(document) | |
do { | |
$('[data-qa="remove-favorite"]').click() | |
await new Promise(r => setTimeout(r, 1000)) | |
$('[data-qa="yes-remove-btn"]').click() | |
await new Promise(r => setTimeout(r, 1000)) | |
next = $('[data-qa="remove-favorite"]') | |
} while (next) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Self-code review: Could make this cleaner someday if web gets the new Node.js v16 Timers Promises API! 🙏 😍
await setTimeout(1000)