Quality Assurance Automation – A function to save your print log

Hi. A lot of QTP/UFT testers love using the print log when creating and debugging automation scripts. This is why we have an awesome function for you that saves this print log to specific location.

1. Copy function below


Function fn_savePrintLog (strFullPath)
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.GetFile(Environment("SystemTempDir") & "\QTPrintLog.txt")
MyFile.Copy strFullPath,True
Set MyFile = Nothing
Set fso = Nothing
End Function


2. To use the function, just call the name and enter the path to where you want to save this print log!

fn_savePrintLog "C:\"

Now go to the C drive and you can see that the log has been saved! Cool right? Let us know your thoughts and feedback below!! We love hearing what our users have to say.

Pin It on Pinterest

Clef two-factor authentication