selector.settings.log

getSelector(id).settings.log()

or getSelector(id).settings.log("first") (since beta 0.4)

or getSelector(id).settings.log("last") (since beta 0.4)

or getSelector(id).settings.log("all")

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

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:

[js highlight=”9″]newImage(“square”, “square.png”)
,
newImage(“triangle”, “triangle.png”)
.settings.before( getImage(“square”) )
.print()
,
newSelector(“shapes”)
.settings.add( getImage(“square”) , getImage(“triangle”) )
.settings.log()
,
newButton(“validation”, “Validate”)
.print()
.wait()
[/js]

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.