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
open https://ui.vision/docs/selenium-ide/addselection-removeselection
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

Fresh from the Ui.Vision Forum: The Latest 3 RPA Software Discussions

← Meet the Ui.Vision team and users on our RPA software forum.