Unable to find PDF in the local drive after successfully executing the task

Hi All,

I have successfully automated a process on a bank’s website but couldn’t find PDF included as one of the tasks in my workflow in the desired local drive.

I do not receive any error in the entire execution but I can’t find the PDF either.

Can anyone suggest why?Book2.xlsx (8.7 KB)
Main1.xaml (119.5 KB)

Hi @Tom1989

Could you try to debug your issue in the Debug mode? Please use the Step into button to move one activity at a time. You will then be able to see exactly how your project is running.

Once again, as I mentioned in my previous post, you are not receiving any errors because your entire workflow is contain within a Try-Catch routine that catches the error but doesn’t do anything with it.

See here:

And after you click on the Catches:

If you add here a simple write line with exception.Message, it will display your error message:


Let me try @loginerror

Hi , are you downloading the PDF from the website and then opening /reading it ? Or the PDF is already stored on the drive and you trying to read all the PDFs one by one ?

@rishivc1 I am evaluating property price on the website and after selecting the entire text, I am trying to click print.

But Instead of printing it on a physical printer, I am trying to save the document as PDF.

@RishiVC1, can you assist me to solve it?

okay , so the issue is with option to get the document printed as PDF ? right ? or reading the document once it’s printed ?

I am able to save it as PDF. but I can’t find it in the destination folder after everything is executed.

Please log the path that you are writing in the the save as window. once the path is logged then check if the path was same as the one where you are looking for the file.

Hi @RishiVC1, can you show me how?

please use log message activity and in the message filed type the same value that you have written in type into activity. Don’t forget to remove the special keys from the message field (if you have typed/used any).

Main1.xaml (8.3 KB)

In the attached example


was the special keystroke and we removed it while logging the message. the written message will be available on the console window.

@Tom1989 if you aren’t able to see any value on the console then its because your bot was failing even before it reached the save as step. The reason you didn’t get any error message , because you have put whole code under try catch. It was capturing the error and not throwing it.

Take the code out of try catch and see where the bot is failing. try catch should be used cautiously, it should be used when you have a plan for the step once it fails.

For example. if the bot fails then send mail to required process owner. sending mail part will be written in catch.

Hi @RishiVC1, Thanks for the information. I understand that an email will be sent to the end user once the bot fails to execute a task.

Can we also configure a catch block to ask the user for manual intervention for a certain input which could not be automated using UiPath and continue the other process using UiPath once the entry is made by the user.

Example: Machine —> Human -------> Machine

Also, I am still working on your suggestion. Please, bear with me for some time :slight_smile:

yes @Tom1989 we can definitely do that, but it mostly depends upon how you have designed the BOT. The approach that you have taken to design the bot plays a vital role in that. The Bot should be designed with the fail-safe approach.

in your case, if possible try to write a bot in such a way that before entering input values on the web page the Bot should first check if all the values are obtained or not. if not then the Bot should ask the user.

Note: If the process is rule-based and can be automated as an unattended Bot then you should try everything in your power to make sure that no human element should get involved in the process.

1 Like