Which attribute in an automatically-generated selector for a Click activity is stable?


which attribute in an automatically-generated selector for a Click activity is stable?

1 Like

@nevesisabela963,

As per the provided part of the selector the below is the right answer

Option 5. tag

Why not the idx: it’s not reliable. idx attribute is assigned to generated data on websites. If it’s a small number it can be related to some headers or simple buttons. If number is big then such attribute can be part of one from many similar elements. For example if you have a website where there is a dynamic table with 100 items and each item have it’s own idx. The problem is that usually these tables have those indexes randomly attached to each element and you can’t be sure that if you will use selector with the “idx = 45” it will work with exact same item on the next run.

Remember: even the practice test gives the tag as incorrect that’s fine. In real exam you won’t have incorrect answer marked as correct so answer as per your understanding

1 Like

Hi @nevesisabela963

Answer is - tag because it refers to the element type which usually stays the same across environments while attributes like idx or title can change dynamically

Happy Automation