GetContents Function (TextField)

Class

TextField.

Action

Returns the contents of a text field control.

Syntax

lsContents = textfield.GetContents ([bRawMode])
Variable Description
lsContents List of items in the text field. LIST OF STRING.
bRawMode Optional. Prevents spaces from being trimmed from items. BOOLEAN.

Notes

GetContents returns a list of strings, with one list element for each text line.

GetContents removes any blank lines within the text. This differs from earlier versions of Silk Test Classic, where blank lines were preserved when getting the contents of a text field.

Example

Verify(MyDg.MyTextField.GetContents(),lsExpectedContents)