Difference between "ctrl" and "uia" Tags in Selector

Im trying to understand how the selectors of an UIElement are built.
When I click on something in an application (here in Word), a selector is generated with the tag “wnd”, that is clear so far. To identify the exact object, I use the automationid and the name (see screenshot) and a “uia” tag is used.

image

However, when I click now on an UI element in another application (Adobe Reader) a “ctrl” tag is used instead of a “uia”. Can someone explain when which tag is used? Is there a standard rule for this? Maybe its because this feld has no “id”?

image

Thanks a lot

1 Like

The first one you have selected UI Framework “UIA” so that’s why you get “uia” tags.

The second one you have left UI Framework at default, so you get “ctrl” tags.

2 Likes

@Tris_H
ctrl: A description of the control type, such as “Button”. The control type of an element is expected to be the same in any instance of the application regardless of the local language.

uia:When available, the Automation Id of an element is expected to be the same in any instance of the application regardless of the local language.

and these are not tags. these are attributes

1 Like

They’re attributes presented in XML format. XML, just like HTML, contains tags.

Hi Paul,
thanks for your answer. What do you mean by "you have selected UI Framework “UIA”, can you please explain this in more detail? Does that mean that ican choose between the frameworks?

In UI Explorer:

image

A similar option exists when indicating an element from Studio. I believe it’s F4 to cycle through the frameworks.

However, I did some playing and it seems like different frameworks are automatically used depending on the app. I tried with Chrome and got the usual webctrl tags. Tried with Outlook and while I expected the ctrl tags, I actually got uia tags. So it seems like it automatically selected that framework for Outlook. Might be something internal to the app that tells UiPath the best framework to use.

1 Like

Thank you for your effort, helped me a lot!

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