Created
June 6, 2021 17:39
-
-
Save texora/f38f7f576e9fdc4a3aedb3c74f976b6a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 selectAllButton = document.querySelector('#selectAll') | |
const removeButton = document.querySelector('.moveElement-btn-trash') | |
const click = (element, duration) => { | |
return new Promise((resolve) => | |
setTimeout(() => { | |
element.click() | |
resolve('success') | |
}, duration * 1000) | |
) | |
} | |
const main = async () => { | |
while (document.querySelector('.starButton-star')) { | |
await click(selectAllButton, 5) | |
await click(removeButton, 2) | |
} | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment