Reuse selector/element in UiPath


#1

HI All,

I am naive in UiPath/RPA and trying to automate a web application process.I want to understand , what is the best practice when it comes to reuse selectors or element.

For example, in one of the workflow, I have found element but this element need to be reused either inside same workflow or in a different workflow. How can we increase reusability of this selector.

Thanks
Sunny


#2

@sunny_sachdeva Store found element in one variable then you can reuse in your workflow


#3

Hello!

It is possible to store the selector inside a String variable and then reuse on another activity passing that variable as a selector.

Example:

Hope it helps :slight_smile:

Regards,


#4

Thanks for quick reply. May I also know is there any way we can club find element and click. Everytime if i use find element and click, it look too verbose.


#5

Find element is one time activity. Then you can reuse it later point of time as many time as you want. Also you can pass it to other workflow.

If you need a dynamic selector, use string variable as suggested by @Lucas.Pimenta