Get list value Version 11 (Java)
Action group: Browsers
...
Description
The action returns the list of selected values from a dropdown list.
Action icon
Image Modified
Settings of parameters
СвойствоОписаниеТипПример заполненияОбязательностьзаполнения поляПараметрыКонтекст | Контекст действия для работы с браузеромContext | Action context for working with the browser. | Robin.Selenium |
Контекст браузераДаЭлемент | Элемент для взаимодействияElement | Element for interaction | Robin.WebElement |
ДаВнутренние значения | Использовать передаваемые значения, как внутренние значения спискаInternal values | Use the passed values as internal values of the list. | Robin.Boolean | true |
НетБез пробелов | Удалять лишние пробелы и пробельные символыWithout spaces | Remove extra spaces and whitespace characters. | Robin.Boolean | true |
НетРезультатыРезультат | Массив выбранных в списке опцийResult | Array of options selected in the list | Robin.Collection |
|
|
Special conditions of use
The action gets information about a single option if the multiple attribute is not set, and multiple options if it is set.
If "Internal values" parameter is not set, visible text is selected, if set, internal values are selected (value attribute of the option tag).
Example of use
Task
There is a dropdown list with a selected value, write it into the "Collection" type variable.
Solution
Use the "Open Browser", "Get list value" actions.
Implementation
- Assemble a robot scheme with the actions.
- Set the "Open Browser" action parameters.
- Set the "Get list value" action parameters. Get the element with the WebSpy tool or copy the full XPath from the page markup and add a new resource (see section Create Web-elements).
- Click "Start" in the top panel.
Result
The program robot completed successfully.
...