web » saveValues(var,locator)
Description
This command is to save the values of one or more matching web form element, such as text box, text area, dropdown,
checkbox, radio button and button. This “value” mentioned here is equivalent to the “value” attribute of the
corresponding form elements identified via the specified locator
. Nexial store the collected “values” as a list, from
which one may use LIST expression, $(array) function or
various list-supported commands such as
base » assertArrayContain(array,expected)
and
number » max(var,array)
. See example below for more ideas.
Parameters
- var - this parameter is to store the value of the attribute.
- locator - this parameter is the locator of the element.
Example
Suppose the following page:
We can retrieve the “age” values (second column) like so (the 4th step):
Here’s the output: