getSelector(id).shuffle() (since beta 0.3) or getSelector(id).shuffle( element1 , element2 , … ) Shuffles the elements that have been added to the selector so far, so their positions on the page are randomly switched (NB: make sure the elements are already printed when you call shuffle). You can specify a subset of elements to be shifted, …
Wiki Category Archives:
selector.select
getSelector(id).select(element) Selects the specified element. Example: [js highlight=”9″ try=”true”]newImage(“square”, “square.png”) , newImage(“triangle”, “triangle.png”) .settings.before( getImage(“square”) ) .print() , newSelector(“shapes”) .settings.add( getImage(“square”) , getImage(“triangle”) ) .select( getImage(“square”) ) .wait()[/js] Adds two images side by side, selects the image square by default, and waits for a click on either one of them.
scale.test.selected
getScale(id).test.selected() or getScale(id).test.selected( value ) Tests whether a button is selected. If you pass a value, it will check that it matches the label of the selected button if it has a label, its index otherwise. If you do not pass a value, it simply checks that a selection happened. Example: [js highlight=”7″ try=”true”]newScale(“score”, 5) …
scale.settings.vertical
getScale(id).settings.vertical() (since beta 0.3) Makes the buttons and labels of the scale appear vertically, with the initially left-most value to the bottom and the initially right-most value on top. If you also use , top labels will accordingly appear on the right, and bottom labels will appear on the left. Example: [js highlight=”3″ try=”true”]newScale(“slider”, 100) …
scale.settings.slider
getScale(id).settings.slider() (since beta 0.3) Transforms the scale into a slider. Note that sliders always have a default value in order to place their cursor. If you do not use the settings command , the central (or next-to-central) value will be used. The Comments column of the results line will report how long it took to …
scale.settings.radio
getScale(id).settings.radio() Makes the buttons of the scales appear as radio buttons. Example: [js highlight=”3″ try=”true”]newScale(“score”, “Terrible”, “Bad”, “Good”, “Terrific”) .settings.before( newText(“left”, “The last movie I saw was “) ) .settings.radio() .settings.labelsPosition(“top”) .print() .wait() [/js] Adds a scale with 4 horizontally aligned radio buttons to the screen, with their respective labels appear on top of them, …
scale.settings.once
getScale(id).settings.once() Disables the scale after the first selection has happened. [js highlight=”4″ try=”true”]newScale(“hunger”, 5) .settings.before( newText(“left”, “Right now, I am… very hungry “) ) .settings.after( newText(“right”, ” not hungry at all”) ) .settings.once() .print() .wait() [/js] Adds a 5-point radio scale and waits for a click on one of its buttons, after which selection cannot …
scale.settings.log
getScale(id).settings.log() or getScale(id).settings.log(“last”) (since beta 0.4) or getScale(id).settings.log(“first”) (since beta 0.4) or getScale(id).settings.log(“all”) Adds a line to the result file indicating which button is selected at what time(stamp). Leaving the parentheses blank is equivalent to passing only “last”: only the very last option to be selected will be saved. If “first”, then the very first …
scale.settings.labelsPosition
(Since version 1.0, formerly labels) getScale(id).settings.labelsPosition(“bottom”) or getScale(id).settings.labelsPosition(“left”) (since version 1.0) or getScale(id).settings.labelsPosition(“top”) or getScale(id).settings.labelsPosition(“right”) (since version 1.0) Sets the position of the labels of the scale to bottom, left, top or right. If you did not specify labels, the buttons’ indices will be used instead. [js highlight=”3″ try=”true”] newScale(“score”, “Bad”, “So-so”, “Good”) .settings.radio() .settings.labelsPosition(“right”) …
scale.settings.labels
Deprecated since version 1.0. Use the settings command instead.