When & How to use Find Children activity

Can anyone tell me where to use Find Children . I m unable to use Find Children. Need to Understand the concepts.

3 Likes

hi @Amarjeet

Please see this link:

Regards…!!
Aksh

6 Likes

Thanks for sharing … In the Demo workflow … scope is taken as FIND_DESCENDANTS.
there are four more options available like FIND_CHILDREN,FIND_PROCESS,FIND_TOP-LEVEL,FIND_THREAD.
can you explain me this all this and where to use this.

2 Likes

Hi @amarjeet_kumar

This enum values are explained in the old documentation on github:
https://github.com/UiPath/SDK/wiki/UiNode#UiFindScope

Note that some of the documentations there might be out of date, but this one is still relevant.

Regards.

3 Likes

That link seems to be dead.
Can anyone provide a new link, please?

Thank you,

hey @syn

Which link?

yeah that is no longer available.

Regards…!!
Aksh

2 Likes

Hi Akshay,

I want to understand about find children activity, can you please help me how to select my table using selectors and what selectors should i give in the filter property?

1 Like

Follow this link, there you have sample file as well to check

2 Likes

I have read through this thread and those pages below,
but there’s no answer to when and how to set FILTER and SCOPE options in the property of this activity FIND CHILDREN.
The uploaded sample scenario “find children in table” seems not functioning, either.

I gathered,
If i want every UiElement value of certain items in the calendar table below in Outlook for example,

the selector for the whole Table goes like this:

<wnd app='outlook.exe' cls='rctrl_renwnd32' title='予定表 - mymail@hotmail.co.jp - Outlook' />
<wnd aaname=', , 2018年10月21日 日曜日 0:00 から 2018年10月28日 日曜日 0:00' cls='DayViewWnd' title='Day View' />`

And here is the selector for the each schedule item in the calendar:

<wnd app='outlook.exe' cls='rctrl_renwnd32' title='予定表 - mymail@hotmail.co.jp - Outlook' />
<ctrl name='plan1, , , 9:30 から 2018年10月24日 水曜日 10:00, 時間 予定あり, 開催者 mymail@*' role='cell' />

What I’m supposed to do is

  1. Add find children activity
    and indicate whole table on screen

  2. Start UiExplorer
    and indicate an item in the table on screen

  3. Pick a line unique to the item but not to the whole table

    <ctrl name='plan1, , , 9:30 から 2018年10月24日 水曜日 10:00, 時間 予定あり, 開催者 mymail*' role='cell' />

  4. Pick some attribute that is common enough and not too spcific

    <ctrl role='cell' />

  5. Set it to the Properties>Input>Filter section of the find children activity

  6. Select “FIND DISCENDANTS” from Properties>Options>Scope option of find children activity

This will return a collection of UiEelents,
which you can use in for each loop by switching the TypeArgument of for each to UiElement, for instance.
Make sure to put UiElement value in the Properties>Input>Target>Element section, not the Selector.

I hope this will help people in need.

Back to the original question, when and how are we supposed to use other Options in Properties>Options>Scope section?

14 Likes

Thank you so much for your comment, it was so helpful for me!

hi
having one doubt…will you able to clear me?

I see the problem, filters do not support wildcards, so you should have filter like this <ctrl role='cell' /> and pick the suitable elements ‘manualy’ in For Each by Get Attribute activity with Atribute “name”.
Scope:

  • FIND_CHILDREN - looking for direct descendants in your element tree (one level).
  • FIND_DESCENDANTS - looking for all descendants in your element tree (all levels).
  • FIND_TOP_LEVELS - seems to be the same as FIND_CHILDREN.

@aksh1yadav could you please help me. i am using find chidren activity in desktop application , some times it is giving correct count of the children but not always.

selector :






Filter : ( by default )

could you please help how filter should be for above selector

Hi @umyvarna

Could you also explain where we have to use FIND_THREAD and FIND_PROCESS options?

Hi @Ajaykumar_14,
Since I wrote my description, UiPath has improved its documentation :wink:
Look at this https://docs.uipath.com/activities/docs/find-children.

1 Like

I would check, if the selector in both case identify the same element.