How to Make Selector Dynamic in Mobile Automation?

Hi Team,

I have heard from UiPath that we cannot use * in Selector for Mobile Automation. Can anybody please tell how can I make the fuzzy or normal selector as dynamic then?

In below given example I want to make the yellow highlighted properties as dynamic


Hi Rahul,

Hope this helps to you.

Hey @Rahul_J

Please check these posts from the great @loginerror!

Fuzzy matching in Selectors

Variables in Selectors

Regex in Selectors
#FeatureBlog - 19.10 - Using regular expression (Regex) in the selector attributes - News / New Features - UiPath Community Forum

Hopefully this helps you :blush:


Hi @sangeethaneelavannan1 @Steven_McKeering for sharing the above articles.


Let me elaborate my problem. There’s one mobile application and I need to get(using get attribute activity) the value of points. Please note in below image “600” and “Gold” will be dynamic. How can I make these attributes as dynamic

This is an example of one user. For different users the value will vary.


Hey @Rahul_J

I think I understand your problem :slight_smile:

To answer the above question, update the selector to be like this:
‘* pts to *’
You need to update any dynamic vaules with a *. The asterisks(*) will handle the different/dynamic values in there.

To get the dynamic value follow these steps:

  1. You need to use a Get Attribute Activity to get the value of the “text” selector regardless of its value. and save it to a new Variable (say “str_Raw”).

To do this:

  • Determine the name of the selector (edit selector). “text”
  • Insert a Get Attribute activity.
  • Indicate element.
  • Update the “Attribute” field from the properties panel with the name of the selector.

Once you have done this, we need to manipulate the string to get our values. I am using Regex to do this. Then we need to save each value to a new variable.

  1. Obtain the Points value (“600”) using this Regex pattern - preview the pattern here. This value is saved as Str_Points.

  2. Obtain the last word (obtain “Gold”) using this Regex Pattern - preview here. This value is saved as Str_LastWord.

  3. Review the results / output pane.

Please take a look at the workflow I have created for you to review
Main.xaml (7.8 KB)

Hopefully this helps you :blush:

@Steven_McKeering Sorry for late response.

First I’ll thank you for replying :slight_smile:

Actually I’m looking, how to make any selectors dynamic in Mobile Automation. text attribute will vary for different users. I want to get the value of text but in Mobile Automation * doesn’t work :frowning:

In addition to this problem, If the value of text is empty and I want to get the value of accessbility id, how can get the value of accessbility id ?