addSelection (locator, option locator), removeSelection (locator, option locator) - Selenium IDE command

The addSelection command adds a selection to the set of options in a multi-select element. And the removeSelection command remove a selection from the set of selected options in a multi-select element using an option locator.

The command is automatically recorded.

addSelection/removeSelection Example

Multi-select boxes let the user select more than one option in the list. And with the "add Selection" and "remove Selection" commands you can automate this task. This example allows you to select your favorite species of flamingo. You may control-click (Windows) or command-click (Mac) to select more than one. UI.Vision RPA records your clicks and adds addSelection and removeSelection commands automatically.

Command Target Pattern/Text
addSelection xpath=//*[@id=\"content\"]/div[2]/div[2]/select label=Andean flamingo
addSelection xpath=//*[@id=\"content\"]/div[2]/div[2]/select label=Greater flamingo
removeSelection xpath=//*[@id=\"content\"]/div[2]/div[2]/select label=Andean flamingo

Works in

UI.Vision RPA for Chrome Selenium IDE, UI.Vision RPA for Firefox Selenium IDE, Firefox IDE Classic

Related Demo Macros

(This command is not part of any demo macro yet)

See also

Select, Web Automation Extension User Manual, Selenium IDE commands, Classic Firefox Selenium IDE.

Anything wrong or missing on this page? Suggestions?

...then please contact us.

<em>UI.Vision RPA</em> Selenium IDE for Chrome and Firefox - Web Test Automation
Subscribe to the UI Vision RPA software newsletter . We'll send you updates on new releases that we're working on.