Listbox
There are two different ways to display listboxes, namely in single-line view and multiline view. The creation of modules varies for both views.
Single-line view
Scanning with Tosca XScan automatically creates single-line listboxes.
Action mode |
Value |
Description |
---|---|---|
Input |
<value> |
Selecting an entry with this value. |
Verify |
<value> |
Verifying, if an entry with this value has been selected. If you select multiple entries, please separate all values by semicolons. |
Buffer |
<buffer name> |
This writes the selected entry to a buffer of the specified name. If multiple entries are selected, Tosca Cloud will buffer all elements with list separators separately. |
Control steering in the test case
When a listbox is steered with multiline view, you must set the action mode of the listbox to Select.
The following properties can be verified with listbox entries in addition to the general properties:
Property |
Description |
---|---|
Selected |
Indicated if the entry is selected or deselected. |
Text |
Entry name |
The following functions are available for the listbox entry. If you do not enter a property in the test step value, the property from the Default property column is used:
Action mode |
Value |
Default property |
Description |
---|---|---|---|
Input |
|
Selected |
Selecting an entry |
Verify |
True, False, <property> |
Selected |
Verifying a property |
Buffer |
<buffer name> |
Selected |
This saves the value true if the entry is selected. If not, false is saved. |
Manipulating listbox items
To be able to modify the name of a multiline listbox item, the configuration parameter ExplicitName with the value True must be added to the module attribute of the required listbox item.
You can use date and time expressions, regular expressions and random values for defining the items.
Deselecting listbox items
Tosca Cloud allows you to deselect all listbox items shown in single-line and multiline view simultaneously and to clear your selection in the listbox.
For this purpose, define the dynamic expression {Clearselection} for the listbox in the according test step and set the action mode to Input.