I need some help with the workflow. Here is what I want to do:
→ I have a webpage that has table embedded and I need to find and Click elements under a certain column, let’s call it “Ticket Col”. If rows under “Ticket Col” are empty my looping activity (For Each) should continue. If some tickets are found, then it should click that ticket element and continue to perform a set of actions.
My challenge: I have tried a few things out and Anchor Base activity seems like the best way to find the anchor element “Ticket Col” and click the UI ticket element under it. Now, I want to do this in the form of a loop similar to a for each. So how to mix an Anchor Base and a For Each/For Each Row activity effectively here.
P.S.: Sorry if this has been asked already, I searched in the forum and I couldn’t find anything relevant to my issue.
There must be an idx or row/column to iterate over in order to put this into a loop. If you have either of these attributes, you can use a While loop to iterate over the data.
@Anthony_Humphries every item has column attributes like " tag=‘A’ tableCol=‘1’ tableRow=‘2’ ". I know how to iterate through excel col and rows, but which activities would allow me to do the following in a webpage:
- identify if there is anything under Col1
- if there is anything under Col1, Click each element under Col1 and conitnue with a set of actions
If your goal is to click the images to redirect to a different webpage, you won’t need the datatable (unless you need information from the table for next process steps).
So your While loop would see if the element exists, and if it does not, break from the loop. Otherwise, click on that element to navigate to it.
You’re right. I don’t need the datatable.
However, If I use a While loop, I would have to set the condition to: while var_under_TicketCol isnotempy continue to click each element under TicketCol. So, how does it know if there is a value in row1,2,3 etc…? var_under_TicketCol would then to need to iterate. And that’s what I’ve had difficulty doing, which is why I tried to do a ForEach in a datatable to know if var_under_TicketCol is empty or not…I hope I’m making sense.
Use the Element Exists activity to check if the selector is valid as you iterate. Once it is not, exit the loop.