Modify ReportToPDFModule to stop cleanup

Class library usage, coding and language questions.
bowang616
Posts: 10
Joined: Tue May 22, 2018 10:12 pm

Modify ReportToPDFModule to stop cleanup

Post by bowang616 » Tue Feb 19, 2019 8:40 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11836
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Modify ReportToPDFModule to stop cleanup

Post by Support Team » Fri Feb 22, 2019 9:14 pm

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
1.png (21.65 KiB) Viewed 91 times
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
.
Image