Hello
The app I am automating has elements whose attirubute value changes. It does follow a pattern though.
Eg: ‘Product P1’ , here P1 changes as we process the products through the app. It changes to P2, P3, etc.
Is there a way to idetify this element with wild card? such as ‘Product P*’. Mobile automation is not supporting wild cards.
Mobile automation as of now does not support wild cards…but it supports variables…you can try creating your own counter and run it in a loop to check the product number…and increment for every transaction
So you can use something like ‘Product P{{counter}}’
you can use UiPath’s “Find Element” activity with a dynamic selector to identify an element with a changing attribute value. Here’s an example of how you can use wildcards in a selector to identify an element with a changing attribute value:
Use UiExplorer to identify the selector of the element you want to automate.
Identify the attribute that changes dynamically. In your case, it’s the “name” attribute that changes as you process different products through the app.
Modify the selector to include a wildcard for the changing attribute value. For example, if the selector for the element with the product name “P1” is:
This selector will match any element with a “name” attribute starting with “Product P”.
Use the “Find Element” activity to locate the element using the modified selector. You can store the element in a variable of type “UiPath.Core.UiElement”.
Once you have located the element, you can perform actions on it using the activities in the “UiPath.Core.Activities” package, such as “Click”, “Type Into”, “Get Text”, etc.