scsvel
14 years agoFrequent Contributor
Need to get picture from TestLog
Hi all,
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..
Suite: App1
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...
Thanks ....
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..
Suite: App1
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...
Thanks ....