Page 1 of 1

Modify ReportToPDFModule to stop cleanup

Posted: Tue Feb 19, 2019 8:40 pm
by bowang616
Hello,

Is anyone familiar with the Ranorex Helper module ReportToPDFModule.cs file? If so, how do I modify the code to stop it from deleting/cleaning up the PDF files that were created during previous runs.

Right now by default, this file converts the report to PDF, then clean up all reports from the previous runs. I want it to still clean up all the files EXCEPT for the PDF files that were created before. I would think I just need to comment out the part in the code that does the PDF clean up, the question is which part?

Thank you.

Re: Modify ReportToPDFModule to stop cleanup

Posted: Fri Feb 22, 2019 9:14 pm
by Support Team
Hi bowang616,

By default, the ReportToPDF module names the PDF the same name as the Ranorex report file and does not delete any old PDFs. If you specified a static name for the Ranorex report or PDF file, then it will override any previous PDF files generated with the same name. Please verify the 'PDFName' parameter is not bound and the Ranorex report file name is dynamic (right-click test suite > Report tab).
1.png
If you continue to experience issues, please upload your solution (compressed) so we can further analyze what may be occurring. You can also contact us here if you wish to troubleshoot this in a more private manner.

I hope this helps!

Regards,
Ned