Download separate files from Web by using click activity recognized by html code

Hello Team ,
Iam facing an issue with downloading documents from web pages .
from example : in the first page Robot should download one file uploaded by customer ,then at the next page it will find multiple files different than the previous one for another case.
my question is how does Robot recognize how many click he will do for each since the file names are different each time. Also some pages does not have any attachments.

Note: the maximum number for attachment is 5

Hi @malattas
I’d first look at the selectors for each document and see what the difference is. Then I’d do a while from 1 to 5, trying to download each document if the selector exists, building the selector dynamically.

thank you for your reply but how can I build the selector
It is not in one division it is

  • inside

      would you please explain more .
      Thanks in advance

  • @malattas can you show us what your selector looks like? the selector for the label “File Name” and the selector for the file name.

    For example you can build dynamic selectors like this:


    You can use the selector index instead of the aaname.

    here is the selector