Created
October 6, 2022 14:56
-
-
Save joemaller/984454486f935d929b0e6b28c4f287d4 to your computer and use it in GitHub Desktop.
bot for helping test online training. Kind of garbage, but maybe useful in the future.
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
/** | |
* For ADP's 2022 sexual harrassment training | |
*/ | |
cr = () => { | |
const next = $('button.next-button:not(.disabled)') | |
if (next.length) { | |
next.click(); | |
} | |
// const module = $('button.module-button') | |
// if (module.length) { | |
// module.sort(()=> (Math.random() - 0.5))[0].click() | |
// } | |
// const section = $('button.section-button:not(.complete)') | |
// if (section.length) { | |
// section.sort(()=> (Math.random() - 0.5))[0].click() | |
// } | |
$('button.ember-view.choice:not(.taken)').sort(()=> (Math.random() - 0.5))[0].click() | |
$('button.choice[data-ember-action]:not(.taken)').sort(()=> (Math.random() - 0.5))[0].click() | |
} | |
g = setInterval(cr, 300) | |
clearInterval(g) | |
function clickRandom(buttons) { buttons[Math.floor(Math.random() * buttons.length)].click()} | |
.module-button | |
.not('.button-container,.complete') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2023, just used these two: