Set list value Version 11 (Java)

Action group: Browsers


Description

The action sets the selected options of the <select> element.

Action icon


Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with the browser.Robin.SeleniumBrowser contextYes
ElementElement for interactionRobin.WebElement
Yes
Single optionThe value of a single option to be selected in the option list of the <select> element.Robin.String
No
Option listA collection of option values to be set in the option list of the <select> element.Robin.Collection
No
Internal valuesIf the parameter value is true, then the passed values will be used as internal option values.Robin.BooleantrueNo
Add optionsIf the parameter value is true, then the specified values will be added to those already set.Robin.BooleantrueNo

Special conditions of use

None.

Example of use

Task

Go to https://www.rpachallenge.com/assets/shortestPath/public/shortestpath.html and set the list value State = AR 

Solution

Use the actions "Open Browser", "Set list value".

Implementation

  1. Assemble a robot scheme consisting of actions:

  2. Set the "Open Browser" action parameter.

  3. Set the parameters of the "Set list value" action. To create an element, use WebSpy (see section Create Web-elements). 

  4. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully.

The required value has been set. 

  • Нет меток