Answer the question
In order to leave comments, you need to log in
How to implement JS script on original tasks?
I have a script that programmatically clicks on a button on the site
So, I have 2 tasks
so that he clicks on it constantly until another window pops up
and so that he clicks on another button after he clicks on the previous one,
how can this be implemented ?
const sleep = (milliseconds) => {
return new Promise(resolve => setTimeout(resolve, milliseconds))
}
window.onload = async function() {
var box = document.querySelector('input[data-indeterminate="false"]')
if (box != null) {
document.querySelector('input[data-indeterminate="false"]').click();
}
while (document.querySelector('button.btn.btn-primary.btn-block') == null) {await sleep(400);}
clck_approve = (document.querySelector('button.btn.btn-primary.btn-block')).click();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question