Hello guys, i got questions about IDX, when is necessary use? Why use?
This attribute is used to distinguish elements with the same selector based on their order in the interface hierarchy. We usually avoid this attribute because if the order of elements change, you will get a wrong element.
Usually, I just use it when I need a Non-Greedy selectors:
so the only function of this attribute is distinguish the elements with the same selector?
Lets say that you don’t have a reliable selector, e.g HTML sample:
<ul> <li></li> <li></li> <li></li> </ul>
And you want always get the second LI, you can then use the idx=“2”
<ul> <li></li> # <- idx="1" <li></li> # <- idx="2" <li></li> # <- idx="3" </ul>
thanks for your help @alexandretperez!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.