Forum Discussion
Dmitry_Nikolaev
Staff
Hi Madhavisri,
You can get this information using the script below:
function getResults()
{
Log.Message("See Information data in the Additional Info panel", getInformationData());
}
function getInformationData()
{
var tempFolder = aqEnvironment.GetEnvironmentVariable("temp") + "\\" + Math.floor(Math.random() * 10000) + "\\";
aqFileSystem.CreateFolder(tempFolder);
Log.SaveResultsAs(tempFolder, lsXML);
var xDoc = Sys.OleObject("MSXML2.DOMDocument.4.0");
xDoc.load(tempFolder + "Description.tcLog");
// Warning count
var wrnC = VarToInteger(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="warning count"]/@value').text);
//Error count
var errC = VarToInteger(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="error count"]/@value').text);
//Execution time
var startTime = VarToFloat(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="start time"]/@value').text);
var stopTime = VarToFloat(xDoc.selectSingleNode('Nodes/Node[@name="root"]/Prp[@name="stop time"]/@value').text);
aqFileSystem.DeleteFolder(tempFolder, true);
var 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");
return res;
}
hhagay
9 years agoContributor
Hello Dmitry
Trying to implement your code I received this error message
Error Invalid class string: cannot obtain ClassID.
I was hoping you could shed some light on it.
Thank you
- tristaanogre9 years agoEsteemed Contributor
That error is generated by the line that calls Sys.OleObject("MSXML2.DOMDocument.4.0")
Basically, it means that, in your environment, that particular MSXML object does not exist.
Try changing the code to simply Sys.OleObject("MSXML2.DOMDocument") and leave the version information off the end. That MIGHT fix it.
Related Content
- 6 years ago
- 11 years ago
- 13 years ago
Recent Discussions
- 2 days ago
- 8 days ago
- 11 days ago