Forum Discussion

BBK's avatar
BBK
New Contributor
8 years ago
Solved

Get current Log Items in Testcomplete V11.31

Hello,

We have upgraded from version 10.60 to 11.31.

All of out other scripts work as before except the Get current Log Items method which we used the sample here to write it :

 

https://support.smartbear.com/viewarticle/9047/?q=xDoc.load%28tempFolder+++%22root.xml%22%29%3B#_ga=1.155513788.689159841.1464894794

 

Error is pointing to this part of the code and Object required  for ( if ("LogData" != logData.nodeName) ) as root.xml can not be found. After inspecting temp folder created on v10.60 vs 11.31 ,it seems like no .xml file is created. My question is , is this a change in the way logs are produced or a specific version of MSXML is required? any settings has changed for mht export or xml exports? or is this is an install issue, this code works on the same PC with version 10.60 versions installed.

 

if (Log.SaveResultsAs(tempFolder, lsHTML)) {

var xDoc = Sys.OleObject("MSXML2.DOMDocument.4.0");

xDoc.load(tempFolder + "root.xml");

var logData = xDoc.childNodes.item(1);

 

if ("LogData" != logData.nodeName)

{

Log.Error("Unable to get information on the current test run.");

return;

}

 

Any help is greatly appreciated.

Thanks

 

 

  • By default test complete now only exports to JSON, if you want xml launch test complete with this flag "-exportLogToXMLAlso"

3 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    By default test complete now only exports to JSON, if you want xml launch test complete with this flag "-exportLogToXMLAlso"

    • BBK's avatar
      BBK
      New Contributor

      Thank you for your help, that solved the issue

    • BBK's avatar
      BBK
      New Contributor

      one more question beside adding it to shortcut and command line, is there a way to set this option when opening .pjs file from the windows explorer to start with this command?