What is the best Selector to use? idx OR name? or else?

Hi, We have a situation where we need to make a dynamic selector. The goal is to use a get text activity with a dynamic selector. The selector will be base on the individual webpage input field. Our get text selector will be in a loop, looping through the web page input fields which means we need a dynamic selector to do this. I hope that makes sense. We know using the IDX is unreliable but it seems that andd name is the only changing part of the elements. what best? see two different input field selectors attached selector


@rohangroombridge

Use name attribute and pass that value into selector to dynamically work with it.

Thank you. Would you mind kindly explaining your reason for choosing the name attribute instead of idx?

@rohangroombridge

name attribute holds the particular value on the page you are trying to select it and also it won’t change where as idx attribute value will keep on change when you reopen it again. If you use *name# attribute in your selector then it is more reliable.

2 Likes

Thats amazing. Thank you all so much!!

1 Like

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