How to create reliable selector for checkbox?

In word document i have multiple check boxes.I am getting below selector.
Check box1:
wnd app=‘winword.exe’ cls=‘OpusApp’ title=‘*’ />
uia idx=‘3’ role=‘table’ />
uia role=‘item’ tableCol=‘0’ tableRow=‘1’ />
uia idx=‘2’ role=‘check box’ />

Check box2:
wnd app=‘winword.exe’ cls=‘OpusApp’ title=‘*’ />
uia idx=‘3’ role=‘table’ />
uia role=‘item’ tableCol=‘0’ tableRow=‘1’ />
uia idx=‘3’ role=‘check box’ />

If i remove idx value . Uipath not highlighting the proper check box.

Please help me to create the selector with out using idx.

image

It’s dependent on the application the checkbox sits in. Sometimes there is no better selector (I have to use indexes sometimes). If I’m forced to use indexes, depending on how reliable I think the system is, sometimes I add the index numbers to the config file so they can be changed quickly later if they are updated.

Alternatively you could try clicking the text next to the checkbox and maybe offsetting if needed?

Hi @BNK ,

Exploring the Visual Tree on the left is one way to go about it.

image

another way would be to create an Anchor and attach it to some text besides the checkbox.

image

If you look at the middle of the screen, you will see several lines of html codes, many of which will contain the containers(texts, aaname, id etc) which can serve as excellent selectors.

Its all trial and error which when you think about it, is kinda fun!

Kind Regards,
Ashwin A.K

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