Click on Expand button where ever it finds in the list

Hi Team,
I am working on web application, It has a list with Many Parent items(dynamic but known names) and expand button beside each of it. I want bot to click on that, after that has to identify which child and grandchild (unknown names) has expand button, based on that it has to click on expand button. If not found in that page, it has to click on Next.
These parent and child names are dynamic.
I am successful for Parent item in using Find children → For Each->Split excel data-> click on expand.[aaname is dynamic, get data from excel]
How to do it for children items as the name beside expand button is unknown? Is there a better method?

I Read thru similar topic
Not able to click item in expandable tree menu
in my case need to expand child items or
in short click on expand where ever it finds expand button in the list.

hi @Divyatirunagari,
You can use another find children activity for the element which you found already.
like this,

Hi @ddrdushy1, Thanks for the reply.
In parent item i gave aaname (if name similar to excel) it will click on expand button. But in child item I dont know the name of the item beside which there is expand button. So how do i use this?
Pls elaborate

hi @Divyatirunagari,
could able to provide some screenshot and your sample excel ?

HI @ddrdushy1

!

Work flow of expand section
Untitled1|571x500
In excel there is just the name of the item beside which there is expand button.

you can try one more thing, in your find children activity set the scope to “find_decendants”

image

it will get all your items. to check put for each activity and do highlight.

in addition to that, you can directly right linq queries or create dynamic selector will helps you find the proper child element

Using Find Descendents
it expanded parent item then got error
image
Bcoz, the given input in Excel is stored as variable andexpanding only that variable(Parent item), how to give name of unknown child item as variable?

How to, could you explain in detail

do you have child node “name” value in excel?

Yes, have.
There is a column in excel where I input the Parent item name, so Bot expands that parent item.

now, could you check the child item selector using ui explorer, whether it have some attribute with your “excel value”

There is only 1 selector for parent item and child item i.e selector of find children.
Find children output is given to for each.
In For each I split the parent names of Excel.
For Each Parent name , Click on expand button.
This click activity selector has aaname
As i know the parent name I have given as aaname in selector. and it is expanding accordingly.
aaname =‘“+Parentname.tostring+”’

sounds confusing :frowning:

Finally, am able to do it.
→ I used Find image activity(whose output is Expand)
→ For Each Item in Expand
→ Click (on expand button)

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