I use the activity find children to have the “LI” tags (in green on the photo below), the problem is that I get the tags in red besause the two lots have the same class name.
Here is what I put on the Edit selector :
@ali_sd
WE cant See the selector Info. Use the Code Format Button of this Editor in Case of you want Share Code with us.
However, Check If the find children ist pointing direct to the Green li parent Ul element. From the tree structure Reading the Green li should be possible.
There is a tag there dataseocategoryid. It seems the LI tags you want have values less than 1000, while the others you don’t want are greater than 1000,
Cycle through your results in a ForEach loop. Inside that place an IF condition with the following:
Is it still returning both the green and red blocks? In that case, why not filter the full results in the way I suggested, by using the value of the data-seocategory-id as this is what seems to differentiate the two blocks.
@ali_sd
You are interested on the Menu Items from TRF cateory. As you have seen the li items in the F12 Browser Tool, you started to retrieve them. But TRF Category was not expanded, right?
Would TRF Category be expanded you could make use of the “_category-link-wrapper menu-item menu-item–level-2 menu-item–current menu-item–selected” from some Parents for anchoring purpose.
Give me some time for some more detail structure analysis. I will revert back to you with some more ideas
@ppr
Thank you for the time you devote to resolving my request.
And in reality what I want to do is browse the children of all the classes “_subcategories subcategory-menu subcategory-menu–level-2”, but I can only get those from the LI tag and the Data-name = “FEMME”.
So if I manage to get the children of the LI tag with the data-name = “TRF” I will be able to loop later to browse the rest.
Indeed if I manage to filter on the parents data-name = “XXX” of the LI tag above, the problem will be solved.
@ali_sd
I brought TRF into the Picture due this is the green block of the screenshot. Femme is the red one.
However give me some time and I focus on reading out from a category by a particular parameter. then we are ready for femme, TRF, Homme, Enfants, Bags and shoes.
Just give me some time I will do it later after my Jobwork. We are close to the solution
@ronanpeter
In fact the purpose behind it is to make a loop on the different classes “_subcategories subcategory-menu subcategory-menu – level-2"
Certainly if I were on a static thing your solution could help.
PFA demo XAML from the first RnD round: ali_sd.xaml (19.5 KB)
It is showcasing following:
retrieval LIs as Uielements
level 2 elements from a particular category
level 3 elemets from a particular Level 2
All level 3 elements from a particular category
For presenting the dedicated access I incorporated some dynamic filled input dialogs e.g.
So have a look on the logs and crosscheck the retrival results
In a next iteration the implementation can be aligned to your detailed retrieval process.
Kindly note: Save the xaml into your UiPath Project properly and dont open it directly from browser.