How to use custom attribute data-testid -custom attribute as strong selector

custom attribute data-testid which is not accessible and visible in selector -UiPath editor


how to use this custom attribute as strong selector

@Neelam_Dave

Welcome to the community

It is an auto generated one and is not so reliable as any small change in the ui also can trigger a different if

That is used for ui to identify elements and take count create visual tree etc

Cheers

@Neelam_Dave
Assume the attribute retrieved by the UI Explorer is <webctrl tag='div' attr1='test_value' />,
you may manually add your specific attribute as <webctrl tag='div' attr1='test_value' data-testid= 'userAuth__select' />.

1 Like

That’s correct we have to add manually but at right place
image

CSS selectors should be avoided if you can. They can easily change. Indicate the element in UI Explorer and post a screenshot showing the upper right pane of the window.

without using cSS selector with custom attribute is there any better option providing selector in UiPath with this custom attribute data-testid-“username_ib”?

You don’t necessarily have to use the custom attribute. That’s why I want to see what properties Ui Explorer sees for the UI element.

You can try using the manual but @Anil_G as he said looks like dynamic.

Can you try the Anchor Based Selector

image

It looks like you are selecting some value from the DropDown

If you can give me HTML code by saving this I will help you.