Uia cls keeps changing for "AttributesGroupBox" & "AttributesListBox" - desktop application

so i have a desktop application. trying to setup a double click activity on group checkboxes.
sometimes it fails at this activity and i noticed the uia cls for this attribute keeps changing.
hence updating and validating fixes it. but again after few runs the cls keeps changing between

“WindowsForms10.Window.8.app.0.141b42a_r22_ad1”

and

“WindowsForms10.Window.8.app.0.141b42a_r21_ad1”

@Moshin_Ali_Khan

That might change as it looks like an auto generated one…

Either remove that attribute completely pr looks like only one part is changing in that place replace *

Cheers

Hi @Anil_G

but I need to perform checkbox selection on these. I didn’t understand.

this is the screen below:

@Moshin_Ali_Khan

From the selector remove the attributes which are changing frequently this way the selector becomes more reliable…

You can still perform all the actions you need like check or uncheck etc

Open ui explorer remove the attribute and check if it is still highlighting the elment

Ideally name attribute and automationid are enough I feel for your scenario to identify the element uniquely …cls is not needed

Cheers

1 Like

Hi @Moshin_Ali_Khan

If any selectors are keep changing we can remove it if the specific attribute is important then use the wildcard (*) to make it dynamic.

Some of the attributes are keep changing in the selectors for pattern UI elements like your case, For those attributes who values are changing then we have to use wildcards if the attribute is not an important one you can remove it.

Hope it helps!!

1 Like

thanks for quick response @Anil_G . worked perfect.

1 Like

hi @mkankatala ,

using wild card (*) worked as well and removing this cls also worked. appreciate your response on this.

1 Like

hi @Anil_G and @mkankatala,

just a question on removing attributes from.
so there is a “fuzzy selector” and a “strict selector”. do we remove not needed attributes from both or just one of them ?

@Moshin_Ali_Khan

you can select strict directly

and remove fuzzy

cheers

1 Like

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