Testcomplete: how to get captured screenshot from 'Picture' panel in logs
I'm generating own log export to pdf by using fpdf. I'm trying to get captured screenshot after click from 'Picture' panel in 'Test Log'. I could get name and status from 'Log Items'. I've tried to check 'Picture' panel's DataType, but it returns 'float' instead of 'image'
logsCol = Project.Logs logItem = logsCol.LogItem num = logItem.ChildCount if num > 0: for i in range(0, num): name = logItem.Child[i].Name status = logItem.Child[i].Status #checking 'Picture' panel data type #here need to get captured screenshot screenType = logItem.Child.Data.Scheme.Child.DataType data = [[name, screenType, status]] #adding data to table for row in data: for datum in row: pdf.cell(3.7, 2*th, str(datum), border=1) pdf.ln(2*th) pdf.output('Path to exported log\\TestReport.pdf', 'F')
Is it possible to get screenshot from TestComplete? (the option to get from the log folder is not suitable)
this is probably the best help that i can give you at the moment for parsing testlogs for pictures, where the code snippet at the bottom of the doc should give you some idea of how to access the pictures (specifically the function ExportPicture() )