What's the way to make dynamic selector whenever class changed every time

You are doing cloud automation and every time you got different title and class with every type into or other activity.

Hey @Pardeep_Malik - welcome to the UiPath Community Forums :partying_face:

To make selectors dynamic you can use an Asterisk * and a Question mark ?

You can use two Regex Quantifiers in selectors: * and ?
A selector might be [type=‘search251’] and the 251 might change every time you click refresh or load an application. You can use an asterisk to allow this to be any values. Like this: [type=‘search*’].
You can use an asterisk * (1 to unlimited) and ? (0 or 1) the same as regex.
You can also use full regex in selectors when you need to for really tough scenarios


Welcome to the community

For title generally we use partial values and use wildcard charqcter * for example if in title one part is fixed and other is changing then we keep only that aprt and remove the changing part and use wild card * in place of that

Eg : title = '*UIPath community*'

And for class…if you find it is jot reliable ypu can follow as above or can remove the class completely and use other attributes whicha re static and unique to identify…apart from that if you know which value might come then can use variables in palce of class or can use a regex if there is a pattern that the class follows…all of this depends on what type of data or selector we are looking at

Eg: class = '*stv-get*' Or class = '{{variable}}' or class = '[A-Za-z]*' matching:class='regex'

All the above are valid…you can use combinations as well if you need



Welcome to UiPath forum

Refer these docs for more insights
There are many approach you can follow and these documents have example on that

I would recommend to try on Regex selector for your scenario

Dynamic selectors

Fuzzy selector

Regex selector

Non greedy search

Case sensitive selector

Hope this helps

Cheers @Pardeep_Malik