Class
- ComboBox
- ListBox
- ListView
- PageList
- PopupList
- RadioList
Action
Verifies the selected item in the combo box, listbox, listview, popup list, or radio list.
Availability
This functionality is supported only if you are using the Classic Agent.
Syntax
list.VerifyValue(aExpected[, nTimeout])
Variable
|
Description
|
aExpected
|
The name or index of the expected selection.
STRING or
INTEGER.
|
nTimeout
|
Optional: The number of seconds to wait for the expected value to be achieved.
NUMBER.
|
Notes
- VerifyValue checks whether the current selection in the list has the expected value. You can specify the expected value either by the numerical index to the list (1-based) or by the actual string. For more information about specifying
aExpected, see the documentation for the appropriate class.
- If the object is a multi-selection or extend-selection list,
aExpected can also be a
LIST OF STRING or a
LIST OF INTEGER.
- Calling this method is the same as calling the
Verify function in either of these ways:
Verify(window.GetSelIndex(), expected_index)
Verify(window.GetSelText(), expected_text)
- If the selected value is not the same as the expected value,
Silk Test Classic raises the exception
E_VERIFY.
- 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.
- The
VerifyValue 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
SelectedIndices property of the
AnyWin class and the
Verify function. For example:
Verify(MyListview.SelectedIndices[1], expected_index)
Example
Elements.ComboBoxList.VerifyValue ("wind")