textinput.test.text
description
Tests for a match with the text in the input box.
syntax
getTextInput(ELEMENT_NAME).test.text(string)
-
string
:
alternate(s)
-
getTextInput(ELEMENT_NAME).test.text( /RegExp/ )
example(s)
@newTextInput("haiku", "hatsu shigure\nsaru mo komino o\nhoshige nari")
@ .lines(3)
@ .print()
@,
@newButton("save", "Save")
@ .print()
$ .wait( getTextInput("haiku").test.text(/^.+[\r\n].+[\r\n].+$/) )
- 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.