Selectors with dynamic content


in my mobile app im faced with ui elements which have a dynamic content e.g. a price:

<mbl android:className='android.view.View' accessibilityId='VKP&#xA;2,65 €' id='' text='' check:text='' />

where “2,65 €” is dynamic
Due to the fact that wildcards are not working in mobile elements i’m lost how to automate this.

i also tried to use elementID in selector
"<mbl android:className='android.view.View' elementId='8c828f2a-4c30-4752-8473-11ec318b5977' />"
but the activities are executed with no error, but also with no action…

I’m using Studio 2022.10 and MobileAutomation Package 22.10.1

you can give a * in the place of the dynamic values

eg: “mbl android:className=‘android.view.View’ accessibilityId=‘VKP *’ id=‘’ text=‘’ check:text=‘’”


unfortunately wildcards are not possible in mobile selectors

HI @mti

Checkout this thread


i don’t know the price (2,65 €) in advanced, variables are not an option. I want to read that price

Hi mti,

Building selectors with dynamic content is currently not supported for native app mobile selectors.

While we do plan to support this in the future, there are alternatives that can be used in the current version to make this work (assuming that what you want is to type text into the field).

Try this: In Indicate/Edit Target mode you should be able to use the fuzzy selector (with a potentially lower threshold) together with an anchor on a more static element to achieve the same result.

Thanks Alvin for the hint, i tried that before, but the fuzzy selector found the wrong element.
But now i only slightly changed the regex: accessibilityId='VKP&#xA;2,65 €'accessibilityId='VKP&#xA;*' instead if accessibilityId=‘VKP*’.
with the additional “&#xA;” uipath was able to find the element.

Thanks a lot!

1 Like

Hi @mti

Did you use Regex to solve this? Can you please share your file?

I want to extract below text from mobile device, can you please advise?
below please find the selector message for the ui within red circle

I am working on mobile device,
using activity “get text” for mobile automation,
i understand that wildcard does not work for mobile automation,
so i try to do regex inside selector,
inside the strict selector i used variable and regex as shown below,

Currency = “USD”
Regex = “*”

However it doesn’t work

i need the currency variable as im looping for other currency like EUR, AUD, it works fine without the regex variable

system recognize the * as string instead of regex, which means it is looking for “USD *”, do you know how to solve this?

Hi Max,

yes, you should activate the fuzzy selectors, here you can use wildcards. In my case the expression without linebreaks were not working, hence i left then in the expression. that was working. Take a look on my prev. post and the explanation of alvin



N.B.: remove from the static selector the dynamic part, just the className attribute

1 Like