Hi Armands,
I was unable to check the correct execution of this script, but you can try something like the script below:
function getResults()
result = getInformationData()
Call Log.Message("See Information data in the Additional Info panel", result)
end function
function getInformationData()
tempFolder = aqEnvironment.GetEnvironmentVariable("temp") + "\\" + Math.floor(Math.random() * 10000) + "\\"
aqFileSystem.CreateFolder(tempFolder)
Call Log.SaveResultsAs(tempFolder, lsXML)
Set xDoc = Sys.OleObject("MSXML2.DOMDocument.4.0")
xDoc.load(tempFolder + "Description.tcLog")
' Warning count
wrnC = VarToInteger(xDoc.selectSingleNode("Nodes/Node[@name=""root""]/Prp[@name=""warning count""]/@value").text)
'Error count
errC = VarToInteger(xDoc.selectSingleNode("Nodes/Node[@name=""root""]/Prp[@name=""error count""]/@value").text)
' Execution time
startTime = VarToFloat(xDoc.selectSingleNode("Nodes/Node[@name=""root""]/Prp[@name=""start time""]/@value").text)
stopTime = VarToFloat(xDoc.selectSingleNode("Nodes/Node[@name=""root""]/Prp[@name=""stop time""]/@value").text)
Call aqFileSystem.DeleteFolder(tempFolder, true)
res = "Errors: " + errC + "\r\n" + "Warnings: " + wrnC + "\r\n" + "Start Time: " + DateTimeToStr(startTime) + "\r\n" + "Stop Time: " + DateTimeToStr(stopTime) + "\r\n" + "Run Time: " + aqConvert.DateTimeToFormatStr(stopTime - startTime, "%H:%M:%S")
getInformationData = res
end function
Does this work?