【UI自动化】Chrome控制台延时点击元素
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)) async function repeatGreetingsLoop() { for (let i = 0; i <= 5; i++) { await sleep(1000) document.getElementsByClassName("el-switch")[0].click(); await sleep(1000) document.getElementsByClassName("el-switch")[0].click(); await sleep(1000) document.getElementsByClassName("el-button el-button--default el-button--small el-button--primary")[0].click(); } } repeatGreetingsLoop()
如果忍耐算是坚强 我选择抵抗 如果妥协算是努力 我选择争取