Idx selector error depending on the order of html code

Hi Community,

I’m facing strange behaviour. My Bot is clicking download buttons on a website.
Unfortunately these rows are only reliably selectable via idx.
So I use the following selector for the “Click” and “Click ‘A’” activities:

<webctrl parentclass='track-main' aaname=' Download ' parentid='content' tag='A' idx='{{intRuntime}}' />

Everything works fine if the CSS container is <webctrl idx='20' tag='ARTICLE' />
but if idx stands at the and of the container definition like <webctrl tag='ARTICLE' idx='20'/>

The selector doesn’t work.

I’m using Studio 2022.12

Am I doing something wrong?

Thanks in advance
BR

Hi @TheIggy
Welcome to UiPath community.The selector which Includes idx is not reliable and it would give problem some time.

1 Like

Thank you!

And there really is no way of fixing that?
It’s so sad because with idx it works 10 times Faster than anchor based.

Idx is not reliable and in many cases not supported: About Selectors (uipath.com)

However, if you are confident that even when the data/state of the site changes, the idx stays valid, it is your tradeoff decision to make.

In regards to this, can you post a screenshot of the full selector, as it is detected that is not working? Did you modify this selector to have idx at the end, or was this how it was initially detected? Need more info…

Thank you for your answer.
The error I get is just a timeout.
I also tried to put the idx at the end of the selector but it dit not work.

<webctrl parentclass='track-main' aaname=' Download ' parentid='content' tag='A' idx='{{intRuntime}}' />

I wouldn’t really care if the anchor base method wasn’t so slow