Are you looking for something like this, Which exists already.
Script to Save Logs:
Function SaveLogAsYouWish
FolderPath = “C:\Desktop\TC_Logs\Log\”
FileName = aqDateTime.Now
log.Message FileName
CurrenTime = aqConvert.DateTimeToFormatStr(FileName,”%d_%m_%Y_%H_%M_%S”)
Log.Message CurrenTime
LogFileName = FolderPath & CurrenTime & “_Log.mht”
Log.Message LogFileName
call Log.SaveResultsAs(LogFileName, lsMHT)
End Function
This function creates log and saves without over righting the existing log. Because the file name is created with respect to time stamp.
Added to it, if you keep this script in Events "OnStop of Test" . It resolves.
Keep this in different project, by sharing different FolderPath
FolderPath1: ProjectA\Logs
FolderPath2: ProjectB\Logs
Regards
Valla
https://vallatestcomplete.wordpress.com
Related Content
- 7 months ago
- 3 years ago
- 7 years ago
- 7 years ago