qc 二次开发 用 VBScript 下载附件
On Error Resume NextSet tdconnction = CreateObject("TDApiOle80.TDConnection")tdconnction.InitConnectionEx "http://lab11:8888/qcbin"tdconnction.ConnectProjectEx "DEFAULT","QualityCenter_Demo","alex_qc",""Set BugFact = tdconnction.BugFactory'根据ID返回需要的附件Set bugObj = BugFact.Item(21)Set attachFact = bugObj.AttachmentsSet attachList = attachFact.NewList("")Set attachObj = attachList.Item(1)Set AttachmentStorage = attachObj.AttachmentStorage'下载到地址AttachmentStorage.ClientPath="F:\a"AttachmentStorage.Load attachObj.Name,Trueif Err=0 Thenwscript.echo "true"elsewscript.echo "false"End If'wscript.echo "结束"