Facing Issue in detecting Child Elements

I am not able to get the name of the child elements by using the Find Children,Get attribute(aaname or innertext) . I tried all the options in the property of Find Children like find descendants ,find top levels,find thread ,find process etc , but not getting the child names.

I have used for each loop to loop through Children element and used Get Attribute to get the aaname but i am getting blank value . Although, I am getting the count of the child elements but not the name of the elements . What shall i do ? The output of the Find Children is UiElement . Is there any way to get the string value of the UiElement ? Or is there any other approach to get the child element details ?
Example:- Material is the parent element and inside it are the child elements .

In a For Each activity, feed in your FindChildren list.

For Each UiElement in FindChildrenList

Write Line > UiElement.Selector.ToString

This will give you the full selector for each child. This will help you understand what is available.

Hey @abhishek26

Please follow the steps, you might have made some mistake

  • Use find children and scrap the entire region output will be in collections.
  • Put for each and make the type argument as UiPath.Core.UiElement
  • Use get attribute for getting the aaname and input as an item inside Element Property.

For your reference:

Thanks,
Goutham Vijay

This is the Hierarchy.
Material–>Fabric
------------------------>Knit
------------------------>woven
------------>Labor
None of the above approach is helping me to solve this issue. @GouthamVijay i have already tried that approach before raising this request , but it was not working. @ronanpeter i am not getting the selector values of the child elements. i am attaching the screenshot of the output which i am getting and i am also uploading the xaml file . In the output i am getting the selector value and the aaname of the parent which is ‘Material’ and whose index is 88 and also selector value of the Fabric whose index is 1 but i am not getting aaname of subParents Fabric and Labor and child elements of Fabric - knit and woven . I am getting child count for ‘Material’ as 4 which is correct but i am not getting the names of the child elements.


_Test.xaml (25.8 KB)

Ok, so the child elements of ‘Material’ certainly have selectors you can work with. Please can you use the UiExplorer to highlight, for example, the first two child elements and provide for the us what they are. There is some indication in your screenshot, but there is a lot of other information there also. I want to understand the construct of the exact child elements you are attempting to access. Then we can filter your find children activity to return only those. We can then identify what in their selectors makes them unique.

Sub-Parents like Fabric and Labor have idx values 1 & 2 respectively, but they have parent id values as well which keeps on changing for different parents( here Material). The intent is to get the names of all the child elements which is not happening. Selector value is also not giving any aanames except for the material which is the parent value.

SelectorValues.html (1022 Bytes)

Have you tried to get the child names using ‘inner html’ or ‘outer html’ in the get attributes?

I have had success in the past using these.

with innerhtml i am not getting anything. with outerhtml i am getting something but that is not gonna help. i am attaching the screenshot for the outerhtml values. The screenshot has total child count as 4 followed by the selector value for each child and outerhtml value. The workflow for this is the same as above test.xaml!
OuterHtmlValues|690x387

How about you use the GetText acitivity on one of the child elements. What does that return?


THis is what i am getting after applying get text for each child element

are you putting UiElement.Selector.ToString in the Selector property of the GetText activity?

yes i did and still getting the same output , 3 blank rows followed by ‘Material’

Hi @abhishek26, did you find a solution for this? I am facing the same issue. aaname, text, innerText, innerHTML all returns empty value.