TreeView.
Verifies the value(s) in a TreeView object.
treeview.VerifyValue(aExpected[, nTimeout])
Variable | Description |
---|---|
aExpected | The expected value, which can be an array of string or integer (an index of the expected selection), an integer, a string, a list of integers, or a list of strings. Any other data type raises the error E_TYPE_MISMATCH. ANYTYPE. |
nTimeout | Optional: The number of seconds to wait for the expected value to be achieved. NUMBER. |
You use the VerifyValue method to check whether a TreeView object has the expected values. If not, Silk Test Classic raises the exception E_VERIFY. The following table explains the verification performed for each valid form of aExpected:
Variable Type | The Verification Performed |
---|---|
INTEGER | That the item indexed by this integer is selected |
STRING | That the selected item matches this string |
LIST OF INTEGER | That the items indexed by these integers are selected |
LIST OF STRING | That the selected items match these strings |
ARRAY OF INTEGER or ARRAY OF STRING | An array is cast to a list and then processed as above. |
If a timeout is specified with the nTimeout parameter, Silk Test Classic calls VerifyValue() 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.
// Is "4Test" selected? MyTree.VerifyValue("4Test") LIST OF INTEGER liIndexes = {2, 7, 9} // Are indexed items selected? MyTree.VerifyValue(liIndexes)