Is there any way to keep the selector attribute value constant?


I am doing a ui automation on one of my application. When I use the click activity to do left and right click on my application. The selector attribute on my application seems to changing every time. Because of that each time when I run the automation the click on the element changes every time.

<wnd app='client.exe' cls='QWidget' title='Clien*' />
<ctrl name='Clien*' role='client' />
<ctrl idx='19' role='client' />

the idx value in my case changes everytime. I just want to understand is there any way to keep it constant.

Or is there any other better solution that using “click image” activity


we cant keep the selector and its attribute value constant and if done then we wont be able to select same element when its orientation is changed in the UI
so rather taking that as a constant we can set the selector to behave in such a way that it can select the element when the SELECTOR BECOMES DYNAMIC
like even if the idx value keeps on changing we can set the selector and the activity to click on the element we want by replacing the value of idx attribute with WILDCARDS
symbol *

like this
idx = ‘*’
or if possible we can ignore that attribute alone from selector by clicking on the three dots in SELECTOR property of the PROPERTY PANEL of click activity
which will open the selector editor where we can uncheck that attribute the right top of the screen


as you said we can go for CLICK IMAGE activity and thats a good option indeed but will be bit slower not much but lit bit when compared to CLICK ACTIVITY
but its reliable indeed

Cheers @John_D


@Palaniyappan Thanks! your idea makes sense. I will go with making it wildcard :+1:

1 Like

cheers @John_D

1 Like