SAME WINDOW WITH DIFFERENT INDEX

Hi guys, I need a little help!

I am carrying out an automation that consists of accessing a standard ERP system

Where I access the same routine in several branches (stores)

The routine works in all stores, except for one field where it changes the index.

What solution could I adopt to make it work in all stores?

The index does not follow a logical numbering pattern, for store 13 and 3 they are index 22. for store 40 it is index 20.

This problem causes the automation to break, where it stops in the routine because it cannot find the field to fill.

Field position on screen is fixed and does not change

Follow the images below


INDEX LOJA 40

You shouldn’t be using idx in the first place. You need to have a selector that’s specific enough that it doesn’t need idx.

Wewould recommend also to change the UiFramework (F4 while taking selector) and do an additional RnD if other Framework is helping to obtain more reliable selectors enriched with adddtional attributes

Hi, I didn’t use these indexes, when I select a field such as CLICK or TYPE INTO it already brings these codes.

When I did tests in different scenarios, I realized that this was the problem of not working in other stores

follow image below

than pressing f4 during field selection it changes graphic structure. AA, UIA, STANDARD

Could you explain each of them to me? And how do you know the best way to use them?

You have to adjust the selectors by including other properties so idx is no longer needed. You can’t always just accept the selector UiPath gives you.

Also, it looks like you’re not on modern and aren’t using the latest version of UiPath.UiAutomation.Activities. The modern selectors work much better.

For this situation, would you advise me to use the structure?

I will update my uipath and test

I don’t know what you mean by structure.

UiFramework (F4 when selecting selector). What would be the best option?

I’m saying you don’t just click the object and accept the selector UiPath gives you. You can, and often must, manually adjust the selector by including other properties, different parent objects, wildcards, dynamic selectors (variables) etc

Hello pdcampagnini

Try editing the selector and replace the number in the idx with and "".
ie: idx='
’ />

Not sure why it stripped out asterixis in my last post.

ie: idx=‘*’

1 Like

That’s not going to help. UiPath puts the idx there because it thinks it needs it to identify the target. By wildcarding or removing the idx, it won’t be able to find the target element. You have to remove the idx property and add other properties so it will be able to find the target element.

1 Like

I’ve tried using the * before… it catches a lost position in the middle of the routine.

I changed the option when selecting the selector, and it worked. I just didn’t understand correctly how to use or what changes in these changes, could you recommend me some article on this topic?

It’s really just a “learn from experience” kind of thing. Every app is different so how you need to do your selectors will be different.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.