I’m using a web application and have a long list of parent categories. When you click on one - it expands a drop down list of children categories under it. I want to click every single parent category so that each one is expanded with its list of children categories. So the list I have is like this (for example):
CategoryABC
CategoryDEF
CategoryHIJ
CategoryKLM
CategoryNOP
Each one expands it’s children subcategories when you click it. How would I automate it to click each one. I can only get it to click the first one and then it stops. There is no pattern to the naming of them - they are all unique.
rmunro
(Rene Munro)
March 6, 2020, 9:44pm
2
Hi @Luecke_Anthony ,
Welcome to the Uipath Community!
You can loop by using a Counter inside the idx of the selector OR you can use datascrapping and use a for each and use click text activity to find each text and click on it.
3 Likes
Thanks! So here I have my table created from the datascrape:
(var: ExtractDataTable)
Then I used a “For Each Row” activity to click the text:
But how do I make it so that it clicks each text item from the table, rather than entering each text individually?
1 Like
rmunro
(Rene Munro)
March 6, 2020, 10:31pm
4
Just use row(0).ToString or row(“ColumnName”).ToString
The one with 0 is the column number.
1 Like
Srini84
(Srinivas)
March 7, 2020, 7:43am
5
@Luecke_Anthony
You need to change in the selector to loop using text,
Can you post the selector of two fields?
Thanks
1 Like
Here is the selector in my data table from the data scrape:
Here is the selector in my “Click Text B” click activity inside the for each loop:
I’ve tried changing the aaname to wildcards but still no success.
Srini84
(Srinivas)
March 7, 2020, 4:47pm
7
@Luecke_Anthony
You already extracted the aa value to datatable, so you just place a for each row and the value of the datatable pass to that aaname.
I hope it will works
Thanks
1 Like
Thanks! Will give this a try soon and report back.
So I’m still not getting it to work. Maybe I’m confused - should I be adjusting my selector on the data table, or adjusting the selector on the click activity?
Here is my click activity inside the for each loop:
Srini84
(Srinivas)
March 9, 2020, 3:18pm
10
Hi @Luecke_Anthony
can you share me the selector you place for the click activity?
Thanks
Sure, here is my selector on the click activity:
How would I pass the value of the data-table to aaname?
Srini84
(Srinivas)
March 9, 2020, 3:23pm
12
@Luecke_Anthony
Place click activity instead of click text
Try this
aaname=“'” + row(0).ToString() +“'”
Hope this works
Thanks
So I tried this:
But it does not validate that as a valid selector. Do I need to create a new aaname variable?
Srini84
(Srinivas)
March 9, 2020, 4:31pm
14
@Luecke_Anthony
Assign a variable and pass the value row(0).tostring()
Ex: Categories = row(0).ToString
Assign the selector to a variable and in that selector pass the value of aa name to categories
If it is not working, can you share the website if possible? save the Webpage and share across
Hope this helps
Thanks
1 Like
So for an example, I can use this site (the logic is the same as what I’m trying to):
So I want to click on each element here to expand it’s drop down:
I have my table from the data scrape:
Here is my selector on the data table:
Here is my selector on the click activity inside the for each row loop:
For this example, how would you get it to click on each of those items to expand it’s drop down?
Here is my current workflow:
Can you clarify how you would implement your suggestions above with this workflow example? I really appreciate the help!
This is perfect. Thank you very much for providing this and all of your help!
2 Likes
system
(system)
Closed
March 13, 2020, 2:55pm
18
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.