'QTP - Logging with folder structure for cases------
Function PushLog(StepName, StepDetail)
Dim dicMetaDescription, intContext
Set dicMetaDescription = CreateObject("Scripting.Dictionary")
dicMetaDescription("Status") = micGeneral
dicMetaDescription("PlainTextNodeName") = StepName
dicMetaDescription("StepHtmlInfo") = "
" + StepDetail +"
" 'Some backdoor settings:
'dicMetaDescription("DllIconIndex") = 206
'dicMetaDescription("DllIconSelIndex") = 206
dicMetaDescription("DllPAth") = "C:\Program Files\HP\QuickTest Professional\bin\ContextManager.dll"
intContext = Reporter.LogEvent("User", dicMetaDescription, Reporter.GetContext)
'Set the new report node as a parent
'From now on, all reports will be added under this node
Reporter.SetContext intContext
End Function
Function PopLog()
'Now return to the parent level:
Reporter.UnSetContext
End Function
'So Calling will be like,
For CaseNo = 1 to CasesCount
Call PushLog(CaseID, CaseName)
For Iteration =1 to DataCount
Call PushLog(CaseID + " - Iteration: "&Iteration, CaseName)
Eval("Case"&CaseNo)
Call PopLog()
Next
Call PopLog()
Next
Comments
Post a Comment