I am logging screenshots in testcomplete via the sys.desktop.image command and every time I log a screenshot (in the same routine) the memory testcomplete uses increases by 50MB. Images are saved as JPEG.
There's also option which forces screenshots to be written to hard disc every X minutes. Set it to 5-10 minutes. It's somewhere in Project Suite's Playback options. Don't remember exact path right now.
I am going to read the TestLog contents from TestComplete test log. Here I am facing problems while getting picture stored in test log.
Ex. My TestLog is as follows..
TestCase1: Check the default mechanisms. // By expanding the Suite row, we will get this line
Step-1: Open the particular page. // By expanding the TestCase1 row, we will get this line
Step-2: Check the page opened and click the Insert Button. // By expanding the TestCase1 row, we will get this line
Here step-2 line has some error and picture got logged in TC Test log. I need to get the picture to some external file.
I tried this.
var logs = Project.Logs;
var logItem = logs.LogItem(0);
var data = logItem.Data(0);
var suiteRow = logItem.Data(0).Rows(0);
var caseRow = suiteRow.ChildRow(0);
var stepRow = caseRow.ChildRow(1); //This will have Step-2 line data
var childPic = stepRow.ChildData(0); //To get the picture object
Here childPic always showing (Null Object) .
But if we try for additional info as below, its working fine. var childAddInfo = stepRow.ChildData(1); //To get the Additional information child object for the selected row.
Can anybody help me what I am wrong? or any other easy methods to get picture from TC Logs...
Thank/Like to help others if my input helped you !!!
I am speaking for myself, not for my employer nor any one. Automation Ecstasy