Monday, August 26, 2013

Custom Reporter using Dictionary - QTP

'Custom reporter function using Dictionary object and sending data to qtp reporting
Public function CustomReporterDict
 ' create a dictionary object
 Set objDict = CreateObject("Scripting.Dictionary")

 ' set the object properties
 objDict("Status") = strStatus
 objDict("PlainTextNodeName") = strStepName
 objDict("StepHtmlInfo") = now & " : " & strMessage
 objDict("DllIconIndex") = 206
 objDict("DllIconSelIndex") = 206
 objDict("DllPAth") = "C:\Program Files\HP\QuickTest Professional\bin\ContextManager.dll"

 ' report the custom entry
 Reporter.LogEvent "User", objDict, Reporter.GetContext
End Function

No comments:

Post a Comment