Problem with 'For Each Ui Element'


I’m currently utilizing the ‘For Each Ui Element’ activity in conjunction with variables to automate the process of clicking and downloading documents from a table on a website. The click activity references the output variable from the ‘For Each Ui Element’ in the ‘aaname’ tag. This is because I’m navigating multiple pages on the same website, and each page contains different documents.

However, I’ve encountered an issue on one particular page where multiple documents share the exact same name. As a result, when the click activity attempts to select a document, it encounters an error due to the presence of two identical UI elements.

How can I handle this situation?

Thank you so much in advance!!