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
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | Action context for working with the browser. | Robin.Selenium | Browser context | Yes |
Element | Element for interaction | Robin.WebElement | Yes | |
Internal values | Use the passed values as internal values of the list. | Robin.Boolean | true | No |
Without spaces | Remove extra spaces and whitespace characters. | Robin.Boolean | true | No |
Results | ||||
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.
Обзор
Инструменты контента