How to handle dynamic pop up in file Explorer

I am saving a file in a folder. If file already present, it is replacing by handling the “Confirm Save As - Yes” pop up. However if file not exist, It is not simply saving. The 'element exists" activity is still looking for the pop up. Please check below screen and advise.


Activity flow:
Click Save button
Check for pop up
if pop up present
Click Yes
messege Box

In the condition please give double equal (==)
And set FileAlreadyExist to False before Element Exists Activity.

Karthik Byggari

You mean FileAlreadyExist variable becoming true even there is no popup?

@Karun I would go about it a different way. Use a file exists activity BEFORE you try to save it at all. If it does exist, then use a delete file activity before you try to save over the new file. This way you will ensure you never get that pop-up at all


Hi @vigneshnkv

I do agree with @Dave’s option as I would also use the same approach as it is the best way to handle the scenario…

@Dave but we need to know the file name before we download to check that file is already existed or not, I guess it is not possible in all the cases


For this scenario, you can use the Element exists as you have used right now. However, in the IF condition which you have to check whether its available or not, you could only use the variable name itself rather than having to mention = true. Since the variable is anyway a boolean, it will give out the result of the expression you are trying to check.

So, to check whether its true
IF FileAlreadyExist - Goes to Then segment of the IF when the pop up is available

If to check whether its not true
IF Not FileAlreadyExist - Goes to Then segment of the IF when pop up is not available

Hi All,

If the file is not already in the folder, it is saved and returning below error. Looks like after saving, it is searching for the “Confirmation Save As” pop up. This is the issue exactly.

@Karun Once you know the name of the file, check to see if it exists. If it already exists, delete it. If it does not exist, continue as normal