The new PCIbex Farm is here! Be sure to check out all of its new features and changes.

Link Search Menu Expand Document



Tests whether the text matches the string (identical, case-sensitive) or the regular expression.


  • string :


  • getText(ELEMENT_NAME).test.text( /RegExp/ )


@Template( row => 
@  newTrial(
@    newText("sentence", row.Text ).print()
@    ,
@    newImage( row.Image ).print()
@    ,
$    getText("sentence")
$       .test.text( /\?$/ )
$       .success( newKey("fj").log().wait() )
$       .failure( newTimer(1000).start().wait() )
@  )
  • Prints a Text element named sentence onto the page using the text from the current table row’s Text column, and below it an Image element using the filename from the current table row’s Image column. Then, tests whether the text content of the sentence Text element ends with a ? character: if it does, the script waits for a keypress on F or J, otherwise it waits 1s before moving on to the next trial.