I need to click on a random/dynamic number of buttons on a desktop application screen to generate a report. All of those buttons have same name. How can I iterate through them one after other?
Looping through similar elements from a desktop application screen by clicking each of those elements. List/Count of elements vary each time the screen gets displayed
Hi @vinnyt1984, You can use Find Children Activity.
This activity is going to return you an
IEnumerable<UiElement>. You can loop through that and get the required UiElement
Welcome to uipath forum
Usually if the name of that is same their attribute idx value or any one attributes value will be incrementing
For example use a click activity and indicate on that button
We will get the selector and attributes of that element
Copy the selector and paste it in notepad
Use another click activity and indicate on next button and copy paste that selector in the same notepad below to the previous one
If there a attribute whose value looks like incrementing then create a Variable for that attribute and then pass the value as a counter incrementing inside a loop
Here you go on how to create a variable in selector
Hope this would help you resolve this
Very helpful. Thank you!
This worked perfect for couple of areas in our use case. Very much appreciate your quick response
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.