Selector attribut - id and tag

Hello everybody,

My selector use id and tag attribute by default.
I want know if the selector is ideal or not.

Thank !

Hello,

tag means the type of element on the page, so it is usually stable.
id should be ok if have simple value, without strange random letters/big numbers.
But this is only my opinion :slight_smile:

1 Like

Thank @Konrad_Mierzwa.

I have question, id = idx ? id can change or is stable ?

nope, idx=‘7’ is generated by UiPath and it means that UiPath found many elements matching to other attributes and we select 7th of them. So large idx values should be treated as unstable.

Id is something read from application, so it depends on how application was written and how often we will have updates

1 Like

@mateo.drouillard

idx will not be stable. But in some cases you can make it dynamic to achieve your task by passing the variables to the idx attribute.

Thanks

1 Like

Hey

Just few points to keep in mind

  1. If in Id any numeric value is coming then it is not appropriate to keep you can use aaname or inner text, if id is coming as text or the element you indicated then you can use it

with regards
Vineet joshi