Code to upload all the local files(e.g. Library) to the QC Test Plan using OTA?
Code is as follows –
strFilePathToSave = “C:\Library\function.vbs”
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
‘ Specify the local path to the file.
LocalFilePath = strFilePathToSave
‘ Specify the Quality Center path to the desired folder
QC_Path =”Subject\BW Automation\Library”
Set node = treeManager.nodebypath(QC_Path)
set att = node.attachments
Set atta = att.AddItem(Null)
atta.FileName = LocalFilePath
atta.Type = 1
Note – This code uploads only one file, run this code in loop & assign file names to variable strFilePathToSave, will upload all files from local folder.
Log in to answer.
Copyright © dBuggr.com - All Rights Reserved.