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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with the browser.Robin.SeleniumBrowser contextYes
ElementElement for interactionRobin.WebElement
Yes
Internal valuesUse the passed values as internal values of the list.Robin.BooleantrueNo
Without spacesRemove extra spaces and whitespace characters.Robin.BooleantrueNo
Results
ResultArray of options selected in the listRobin.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

  1. Assemble a robot scheme with the actions.
  2. Set the "Open Browser" action parameters.
  3. 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). 
  4. Click "Start" in the top panel.

Result

The program robot completed successfully.


  • Нет меток