Hi All,
during the test in QTP (launched from ALM) I am uploading generated excel file to the test run attachment using this function:
Function is working great.
Question is how to update the function that it will overwrite the attachment when the name of the file is the same as the file allready attached?
(Currently i am checking the attachments and if there exist one with the same name i am deleting it before attaching a new one with the same name, but the solution is not a pretty one...)
What i am looking for is some kind of parameter of the method "Post" that will tell the function to overwrite existing attachemnt...
during the test in QTP (launched from ALM) I am uploading generated excel file to the test run attachment using this function:
Code:
Function UpLoadAttachmentToQC(FilePath)
Set ObjCurrentRun = QCUtil.CurrentRun.Attachments
Set ObjAttch = ObjCurrentRun.AddItem(Null)
ObjAttch.FileName = FilePath
ObjAttch.Type = 1
ObjAttch.Post
ObjAttch.Refresh
End Function
Function is working great.
Question is how to update the function that it will overwrite the attachment when the name of the file is the same as the file allready attached?
(Currently i am checking the attachments and if there exist one with the same name i am deleting it before attaching a new one with the same name, but the solution is not a pretty one...)
What i am looking for is some kind of parameter of the method "Post" that will tell the function to overwrite existing attachemnt...