I have having problems in Uploading and downloading the files in QC. Uploading and the file is in a different folder and not the current test. I have a results sheet which is downloaded from TEMPLATE folder in QC and after updating with the results on the file, i am uploading the file in QC on RESULT's folder.
PS. the uploading and downloading is not done in the current test folder.
'//this function is to download the file from QC
If CreateObject("Scripting.FileSystemObject").FileExi sts (DestPath&Filename) then
msgbox "File exists"
Var = PathFinder.Locate(Filename)
CreateObject("Scripting.FileSystemObject").CopyFil e Var, DestPath
CreateObject("Scripting.FileSystemObject").GetFile (DestPath&"ALL_LISTS_2183_"&Filename).Name = Filename
msgbox "File NOT exists"
strQCPath = "Subject\Automation_Framework\Test_Automation_Triu mph\Test_Results"
strFilesystemPath = "D:\Automation_PoC\QTP\Result\Results_Old.xls"
'//UploadFiletoQC strQCPath,strFilesystemPath '//Upload the file in QC]
Public Function AttachToQC(strQCPath,strFilesystemPath)
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
' Specify the local path to the file.
LocalFilePath = strFilesystemPath
' Specify the Quality Center path to the desired folder
FolderName = strQCPath
Set node = treeManager.nodebypath(FolderName)
set att = node.attachments
Set atta = att.AddItem(Null)
atta.FileName = LocalFilePath
atta.Type = 1