I am working on a User script but it seems to work just for the first comparison:
(function() {
'use strict';
var noError = document.getElementsByClassName("noMistakeButton");
var next = document.getElementsByClassName("nextButton");
var wait = document.getElementsByClassName("understoodButton");
var okko = document.getElementsByClassName("buttonKo");
var exitOkko = document.getElementsByClassName("exitButton");
while(1)
{
if( noError !== null)
{
noError.click();
}
if( next !== null)
{
exit.click();
}
if( wait !== null)
{
wait.click();
}
sleep(2);
if( okko !== null)
{
exit.click();
}
if( exitOkko !== null)
{
exitOkko.click();
}
} })();
My goal is the run this script freely while AFK. There are, as you can see, many buttons on the web page and each button cant be :visible or :hidden. My goal is just to click on them.
Here is the target page (static URL).
Some buttons only have class and no ID. Others have them both.
The console reports:
ERROR: Execution of script 'AutoVoltair' failed! noError.click is not a function