How to autocomplete multi select fields on a Web page using data in RPAx Recorder variable table?


I am trying to automate filling of a web form RPAx and when it comes to the multi select fields I cannot find a way how to automatically populate answers from my Recorder Variable table without hard coding them for each client in my list by using using a specified xpath-mouse-click action or even constant variable. Is it possible to perform such autocomplete by using only the RPAx Recorder Action Library or a custom code needs to be written for this?

1 Like

Hi @gmryglo
Is this some assignment in the Automation Academy you’re doing? Which one?


Hi @gmryglo

You can see that the options are the same as the value of the attribute “aria-label” of the web element

So you can build the XPath to click the element with particular value in this attribute.

If you store the value in the variable “purpose”, for example, you can use XPath //div[@aria-label="${purpose}"] to click the option you need.



it’s Assignment 6: Using XPath expressions


If each of the checkbox fields has it’s own xpath, and my list of employees to fill in the Web form is more than 1 (let say 5 records) and each would have it’s own answer in ‘Purposes’ field.

I could not make it filled in the same way as I did for a free text fields or a drop-downs using ‘Web Element (by XPath) + Enter Keystrokes (by Element + Index)’ or ‘Click Mouse (by XPath) + Enter Keystrokes (by Element + Index)’ respectively.

The question is:
What is the best practice to teach a Bot to select the corresponding answers on Web form each time it works with a new Index from my ‘employees_list’ table so that it would be fully automated process and will not fail if employees answers change or the amount of answers on web form will change?

So far I could find only one option for my bot to automatically fill in the checkbox fields regardless how much employees provided their answers in my table and if their Purposes were different:
it has one For Each loop scenario with a long If-Else scenario for different answer options for ‘Purposes’ question



You can use element with index in the XPath, too: //div[@aria-label="${element[7]}"] - it will get different values for each employee and will check a different box each time.

For free text fields, instead of clicking and typing, you can also save data about each employee in String variables as shown in this post and then paste it using Web element action.


Thank you, that worked perfectly.

1 Like