PennController for IBEX › Forums › Support › Neutral answer on test.selected › Reply To: Neutral answer on test.selected
January 26, 2022 at 1:38 pm
#7700

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