Upload Attachments To QC
Function UpLoadAttachmentToQC(FilePath)
Set ObjCurrentTest = QCUtil.CurrentTest.Attachments
Set ObjAttch = ObjCurrentTest.AddItem(Null)
ObjAttch.FileName = FilePath
ObjAttch.Type = 1
ObjAttch.Post
ObjAttch.Refresh
End Function
FilePath=”C:\abc.vbs”
Call UpLoadAttachmentToQC(FilePath)
Author: Mohan Kakarla
Source: QC-OTA
3 Comments »
Leave a comment
-
Archives
- November 2008 (4)
- October 2008 (1)
- September 2008 (2)
- June 2008 (1)
- March 2008 (4)
- February 2008 (44)
-
Categories
- Automated Test Script Creation Process
- Automating MS Word
- Automating QC
- Automation Object Model For QTP
- Backward compatability in QTP
- Browser Scripts
- COM and QTP
- compare 2 text files
- Descriptive programming
- Descriptive Programming and Child Objetcs
- Dictonary Object
- DotNetFactory
- Excel Automation
- Extra Topics
- Files and Folders
- General Standards to be followed in Test scripts
- New Features In QTP9.5
- QC-OTA
- QTP Additional Faqs
- QTP Faqs
- QTP Naming Convention
- QTP Tips and Faqs
- Running stored procedures from QTP
- Send keyboard keys
- Uncategorized
- Uninstall a software using QTP
- Uninstall a software using vbscript
- Update data in a database
- VBScript and IE Automation
- VBScript Faqs and Useful resources
- What’s New in Quick Test Pro 9.0
- Whats New in QTP 9.5
- XML Scripting
-
RSS
Entries RSS
Comments RSS

Hi Mohan,
This is really Excellent site for the QTP Testers:-
I have to (upload)attach screen shot in QC against some particular steps, if a condition is fulfilled I want to call that function and upload the attachment again the Test step in QC.
Please have a look and let me know if you need more clarifications).
Thanks
Hi Mohan,
Fantastic efforts!!
I was able to upload attachment for the QCUtil.CurrentTest
and QCUtil.CurrentRun. But I was not able to upload attachment for a particular ’step’ in the ‘Run Steps’ Please guide thru.
Many Thanks
Hi there,
Well i am looking for the vb code to use in excel.
My actual plan is to place a button in excel and once we click on the button the attachment of the excel file should get uploaded to selected test plan in the test lab module in the Quality Center.
If u can provide me the code i would appreciate it.
Thanks in Advance,
Regards,
Chatiu