UI automation Selector question

Hi,
In general, when I indicate an application in a browser, I find cls attribute like below. Since it is a number, do I have to wild card it? Or can I keep it? Please suggest.
Thank you so much.

@A_Learner,

I would suggest to remove it. Keep the attributes which are known to you.

Thanks,
Ashok :slight_smile:

Hi @A_Learner

If you are getting any number in the Cls attribute it is better to make it wildcard.

Hope it helps!!

Thank you, so I removed cls and ctrlid from the following. It is not identifying.

wnd app=‘msedge.exe’ cls=‘#32770’ title=‘Save As’
wnd aaname=‘Explorer Pane’ cls=‘DirectUIHWND’
wnd aaname=‘File name:’ cls=‘ComboBox’
wnd ctrlid=‘1001’

Thanks,

@A_Learner,

Do you have multiple edge browser window open?

Thanks,
Ashok :slightly_smiling_face:

Yes, correct. Multiple edge browsers open. This is the pop up save as window when I click download on the primary window.

@A_Learner,

Then I think you can’t remove that number. Just remember to do regression testing to see if that number is changing or not.

Thanks,
Ashok :slight_smile:

1 Like

are you suggesting the cls number or ctrlid.

thank you

@A_Learner,

Test both please.

Thanks,
Ashok :slight_smile:

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