Why i have to re-adjust the dynamic selector everytime

hi everybody,
after adding a click activity with a dynamic selector it runs fine and suddenly after a period it fails and shows me the not validate status so i need to re-adjust manually the selector to be valid
Can you help me with this one?

Hi @Aymen_Ftiti,

I’ll suggest you, to save those 2-3 different selectors in notepad and see which attribute is keep changing, sometimes selector is having “idx” or “cls” attributes and their values are not same everytime.
Once you identified those attributes you should replace their values with wildcards to make selector dynamic.
have a look here to know more about wildcards

Try to make dynamic, shorter & meaningful selector, and give it a shot. :wink:

1 Like

thanks @samir,
i’ll try it, but you mentioned “shorter”, isn’t better to make the selector more specific so more longer (adding more properties and check parents tags) or am i wrong?

Yeah, you’re right. @Aymen_Ftiti

by shorter, I meant you can eliminate unnecessary attributes, and use those attributes combination which is making it more specific.
:+1:

Ok, thanks for the help @samir