Get list value Version 11 (Java)
Action group: Browsers
Description
The action returns the list of selected values from a dropdown list.
Action icon
Settings of parameters
Свойство | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
Параметры | ||||
Контекст | Контекст действия для работы с браузером. | Robin.Selenium | Контекст браузера | Да |
Элемент | Элемент для взаимодействия | Robin.WebElement | Да | |
Внутренние значения | Использовать передаваемые значения, как внутренние значения списка. | Robin.Boolean | true | Нет |
Без пробелов | Удалять лишние пробелы и пробельные символы | Robin.Boolean | true | Нет |
Результаты | ||||
Результат | Массив выбранных в списке опций | 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.