Last active
June 27, 2022 10:15
-
-
Save senechaux/2bf51f8c633e8306d543429a978b49d4 to your computer and use it in GitHub Desktop.
Script wordle para escribir palabras
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 words=["pauta","enero","dudar","logro","sushi","pañal","caida","cargo","tenaz","firme","fresa","teñir"]; | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
const writeWords = async (words) => { | |
let index = 0; | |
for (const word of words) { | |
console.log('write word '+(++index)+'/'+words.length+': '+word); | |
const letters = Array.from(word); | |
for (const letter of letters) { | |
$(".chakra-button[aria-label="+letter+"]").click(); | |
await sleep(50); | |
} | |
$(".chakra-button[aria-label^=procesar]").click(); | |
await sleep(1300); | |
} | |
console.log("GO GO GO!") | |
}; | |
writeWords(words); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment