Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QC-QTP Integration
#2
Not Solved
The following function will be useful :

Code:
Function DownloadAttachements(qtApp, tdc, testPath, strFSAPath)

    For Each oTestSet In tdc.TreeManager.NodeByPath(testPath).TestFactory.NewList("")
            ScriptName = oTestSet.Name
            Script = "[QualityCenter] " & testPath & "\" & ScriptName
            Dim otaAttachmentFactory
            Dim otaAttachment 'As TDAPIOLELib.Attachment
            Dim otaAttachmentList 'As List,
            Dim TAttach 'As Attachment 'As TDAPIOLELib.List
            Dim otaTreeManager 'As TDAPIOLELib.TreeManager
            Dim otaSysTreeNode 'As TDAPIOLELib.SysTreeNode
            Dim otaExtendedStorage, AttachDow
            Dim fso
            
            Set fso = CreateObject("Scripting.FileSystemObject")
            Set otaAttachmentFactory = oTestSet.Attachments
            Set otaAttachmentList = otaAttachmentFactory.NewList("")
            'MsgBox "Attachment Count:" & otaAttachmentList.Count
            
            If otaAttachmentList.Count > 0 Then
            Set otaAttachment = otaAttachmentList.Item(1)
            otaAttachment.Load True, ""
            strPath = otaAttachment.Filename
            
                     DownloadAttachements = strPath
                     SysPathF = strFSAPath & "Attachments_" & oTestSet.Name
                     Call CreateFolder(SysPathF)
                     SysPath = SysPathF & "\"
                     Call CreateFolder(SysPath)
                     fso.CopyFile strPath, SysPath
            Else
            'MsgBox "Fail"
            DowloadAttachment = "Empty"
            End If
          
            Set otaAttachmentFactory = Nothing
            Set otaAttachment = Nothing
            Set otaAttachmentList = Nothing
            Set otaTreeManager = Nothing
            Set otaSysTreeNode = Nothing
            Set fso = Nothing

        Next

End Function
Reply


Messages In This Thread
QC-QTP Integration - by shipu - 04-29-2014, 01:08 AM
RE: QC-QTP Integration - by Jay - 05-29-2014, 02:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Jenkins Integration Problem Sagar Sheth 3 2,912 03-30-2018, 04:11 PM
Last Post: Rahuls848
  JENKINS to QTP Integration Remotely WMI/VBscript help need raju999 0 4,723 01-27-2013, 05:22 AM
Last Post: raju999
  QTP supports 'Team City' Continuous Integration Tool qtpexpert 0 4,308 01-23-2012, 06:20 PM
Last Post: qtpexpert
  QTP & Star Team Integration sumte 0 2,556 02-19-2008, 10:10 PM
Last Post: sumte

Forum Jump:


Users browsing this thread: 2 Guest(s)