QTP 如何输出Report中Object,Details等
如图想把Object,Details,Time,Result等输出到Excel中,如何获取这些值呢? 回复 1# tianchuncheng在脚本中直接获取,然后自己写脚本写入Excel比如:
Public Function QTP_Write_Excel(pathway,sheetname,x,y,content)
Dim srcData,srcDoc,sp1,sp2,num,use,a1,a2,a3
set srcData = CreateObject("Excel.Application")
srcData.Visible = False
set srcDoc = srcData.Workbooks.Open(pathway)
srcDoc.Worksheets(sheetname).Activate
srcDoc.Worksheets(sheetname).Cells(x,y).value = content
wait(1)
srcDoc.Save
srcData.Workbooks.Close
Set srcDoc = nothing
Window("text:=Microsoft Excel").Close
End Function 回复 2# 黑羽祭
非常感谢
页:
[1]