Class
- ComboBox
- ListBox
- ListView
- PageList
- PopupList
- RadioList
- Table
- TreeView
Action
Verifies the contents of the object.
Availability
This functionality is supported only if you are using the Classic Agent.
Syntax
object.VerifyContents(lsExpected[, nTimeout])
Variable
|
Description
|
lsExpected
|
The expected contents of the object.
LIST OF STRING.
|
nTimeout
|
Optional: The number of seconds to wait for the expected value to be achieved.
NUMBER.
|
Notes
- VerifyContents checks that the contents in the control match the list of string passed in. If the contents do not match,
Silk Test Classic raises the exception
E_VERIFY.
- Calling this method is the same as calling the
Verify function in the following manner:
Verify(object.GetContents(), lsExpected,"contents")
- If a timeout is specified with the
nTimeout parameter,
Silk Test Classic calls
VerifyContents() until the condition is verified or the timeout is reached. The time between checks is the value of the window retry interval Agent option (OPT_WINDOW_RETRY). If the verification fails, an exception is thrown.
- The
VerifyContents method is not available in the
ListViewEx class, which is the equivalent of the
ListView class on the Open Agent. To achieve the same functionality for a listview on the Open Agent, use the
GetContents method of the
ListViewEx class and the
Verify function.
Example
list of string lsContents
lsContents = xPopupList.ThePopupList.GetContents()
ListWrite(lsContents, "PopupList.txt")
xPopupList.ThePopupList.VerifyContents(lsContents)