or getScale(id).test.text( /RegExp/ )

Tests for a match with the text in the input box.


[js highlight=”7″ try=”true”]newTextInput(“haiku”, “hatsu shigure\nsaru mo komino o\nhoshige nari”)
newButton(“save”, “Save”)
.wait( getTextInput(“haiku”).test.text(/^.+[\r\n].+[\r\n].+$/) )[/js]

Adds a 3-line input box to the screen containing a haiku (note the \n to insert linebreaks in the text) above a Save button and waits for a click on the button. The click is validated only if, at the moment of the click, the text in the input box contains three lines of text.