How to get the "class" of all sub directories as shown in UI Explorer?

I want to get the element attribute “class” of highlighted DIV as shown in UI Explorer to a List of String, how could I do to get such list ? so that i could use “For each” and “Get Text” to extract the text from multiple pages.

Thanks in advance.

image

Hi @scheng ,

Try using the Get Attribute Activity.

It should provide you with a list of all possible attribute that could be extracted from the UI Element.

tried but seem could only get the attribute of indicated element ? how about the element in lower level of the indicated one ?

HI,

FindChildren activity might work in this case, as the following.

img20220318-4-2

Regards,

1 Like

@scheng ,

It seems you want the Class Attribute of Children of the DIV Element, In that case, Could you give a Try on using the Find Children activity.

We should then be able to use the For Each Activity with TypeArgument Property as UiPath.Core.UiElement, to loop through each UI Element and Get the class value of the Element.

There is a Short hand operation instead of using the Get Attribute Activity in this case. Where we can use the UiElement variable itself to get the class attribute.
Like Below :

1 Like

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