Problem with save as file from web

I have some files i want( save as) to folder
the problem is sometimes there is more than one file in the downloads,then the RPA click the wrong file to save :frowning:
what should i do to fix this issue?
thank you for your support

Hello Reem,
Usually an anchor to a static element helps in case the attachment you are looking for stays in same place.

yes it is static , but the RPA click the wrong file :frowning: , because there are some files pending

Pls share screenshot with anchors and multi file example

sorry I can’t share the files because it is on a work device
DownloadManagerIE9

this is the Downloads screenshot
I want always save the last file “only” , but the RPA sometimes press the wrong file to save

I really appreciate your assistance

If it’s always the last file (or the only one) you could try data scraping, capture name of last item in a range and use it as selector.

I referred to this post for dynamic selector creation.

Hopefully this is a solution for you.

thank you so much jakub

yes, it is
but sorry I don’t get it, can you explain more, please?

excuse me for such late reply. in case the issue is still ongoing you could try following:
Use Table Extraction in the area where your attachments are and select Save For Later Use in to have a list of available attachments.


Then you can use Excel to write down the list of available attachment and to know on which position is last one using FindFirst/Last Data Row:

Now, in order to use a dynamic selector you should create a variable that will be used to select text of visible attachaments. The variable is used to validate selector.

image
in the Value field please type what actually visible on your screen, this will help to validate selector

The variabale should be assigned to actual last items from attachment list. in this example custom input of excel file is selected, cell addres is “A” next to it is the number stored under LastRow saved value.
Next step is the click action. Indicate target on the screen that is aligned with variable name used in Value Mapping.

open settings, select Selector only, leave the aaname only, but instead of what was provided there please use double curly braces and put name of your variable inside.

this way only the last item from your list should be clicked and saved.

Have you tried HTTP Request activity instead of Click → Save As…? You can use HTTP Request GET method to download any available web resource. You can indicate in ResourcePath property destination location and file name of the file to save.

image