selector.log

description

A line will be added to the results file when an element is selected indicating its reference name and the timestamp of selection.

syntax

getSelector(ELEMENT_NAME).log()

alternate(s)

  • getSelector(ELEMENT_NAME).log("first")

  • getSelector(ELEMENT_NAME).log("last")

  • getSelector(ELEMENT_NAME).log("all")

notes

  • Leaving the parentheses blank or calling "last" will log the last selection. Calling "first" will log the first selection. Calling "all" will log all selections.

  • Note: in beta 0.3, the only options were blank and "all", and they were equivalent.


example(s)


@newImage("square", "square.png")
@,
@newImage("triangle", "triangle.png")
@    .before( getImage("square") )
@    .print()
@,
@newSelector("shapes")
@    .add( getImage("square") , getImage("triangle") )
$    .log()
@,
@newButton("validation", "Validate")
@    .print()
@    .wait()
  • Adds two images side by side and a button to click below them. Any selection of either image will output a line in the results file.