Reply To: Timers

PennController for IBEX Forums Support Timers Reply To: Timers


Hi Elias,

You never print the TextInput element so it won’t appear on the page. Your script gets stuck on its wait command because, the element not being displayed on the page, you cannot press Enter to validate it.

I suspect that what you want is:

newTimer("allotted time", 6000).start()
newTextInput("feedback", "Enter your answer")
    .size(400, 200)
    .callback( getTimer("allotted time").stop() )
getTimer("allotted time").wait()
getText("word").remove()         // Take the word off the page
    // .wait( getTextInput("feedback").test.text(/^.+[\r\n].+[\r\n].+$/) )
    .test.text( row.CorrectKey )
    .success( newText("Good job!").print() )
    .failure( newText("Wrong anwser!").print() )
newTimer(2000).start().wait()   // Wait 2s on the empty page