Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bot for helping test online training. Kind of garbage, but maybe useful in the future.
/**
* 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