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):
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.
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.
Thanks! So here I have my table created from the datascrape:
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?
Just use row(0).ToString or row(“ColumnName”).ToString
The one with 0 is the column number.
You need to change in the selector to loop using text,
Can you post the selector of two fields?
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.
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! 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:
can you share me the selector you place for the click activity?
Sure, here is my selector on the click activity:
How would I pass the value of the data-table to aaname?
Place click activity instead of click text
aaname="’" + row(0).ToString() +"’"
Hope this works
So I tried this:
But it does not validate that as a valid selector. Do I need to create a new aaname variable?
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
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!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.