Custom Search

Monday, October 22, 2012

How to Import\Download attachment files from QC Test Plan to local Drive


LocalFilePath = "C:\Updated_Files_Form_QC_TillDate"
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
'Specify the Quality Center path to the desired folder
QC_Path ="Subject\Automation\Regression\Library"
Set node = treeManager.nodebypath(QC_Path)
set stratt = node.attachments
For Each obj_QCAttachment In stratt.NewList("")
      Set obj_QCAttachmentStorage = obj_QCAttachment.AttachmentStorage
      obj_QCAttachmentStorage.ClientPath = LocalFilePath 'give the directory where u want to save the file
      obj_QCAttachmentStorage.Load obj_QCAttachment.Name,True
Next

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.