Nexial Automation

Test Automation Platform for everyone!

X

web » saveSelectedValue(var,locator)

Description

This command is to save the selected option value of a web select element to a user defined variable via var. This “value” mentioned here is equivalent to the “value” attribute of the selected option of the corresponding select element identified via the specified locator.

Note: This command will store the array of selected option values from the multi-select list box.

Parameters

  • var - this parameter is to store the value attribute of selected option in select element.
  • locator - this parameter is the locator of the select element.

Example

Sample HTML:

Data file:

Output:

See Also