Reply To: Neutral answer on test.selected

PennController for IBEX Forums Support Neutral answer on test.selected Reply To: Neutral answer on test.selected

#7700
Jeremy
Keymaster

Hi,

You can use the same approach, with minimal tweaks:

newTrial(
    newFunction(function(){ 
        this.scales = [];
        $("body").click(e=>e.target.type=="range"&&this.scales.push(e.target.parentElement.classList[1].replace(/PennController-/,'')));
    }).call()
    ,
    newScale("test1", 100).size("75vw").slider().print()
    ,
    newScale("test2", 100).size("75vw").slider().print()
    ,
    newButton("Validate")
        .print()
        .wait( newFunction(function(){return ["test1","test2"].filter(v=>!this.scales.includes(v)).length}).test.is(0) )
)

You just need to list all the names of the Scale elements you want to validate as an array in place of ["test1","test2"]

Jeremy