Error while uploading Attachments under Test Plan using QC OTA
I am trying to upload an attachement in a specified folder Test Plan using QC OTA.
Here the code snippet:
Dim QCConnection Set QCConnection = CreateObject("TDApiOle80.TDConnection") QCConnection.InitConnectionEx qcURL QCConnection.login strUserName, strPassword QCConnection.Connect strDomain, strProject Set treeM = QCConnection.TreeManager Set folder1 = treeM.NodeByPath(strTestPath) Set tAttachment=folder1.Attachments Set tAttach=tAttachment.AddItem(Null) tAttach.FileName = strClientPath tAttach.Type = 1 tAttach.Post
i am executing this in an excel macro.
While posting it throws an erroe "Server Failed to Create requested object"
When i am running the same code in QTP or in seperate .vbs file its working fine.
Can anyone please suggest me a solution ASAP?
Are you providing all the variables?
qcURL, strUserName, strPassword,strDomain, strProject, strTestPath and strClientPath ?
Thnks for ur response.
I just uninstalling QC Excel Addin and reinstalled the same now its working fine.
I have seen in one forum that
"check for Excel addin version if its not latest just install new version of it then it will work fine"
i have previously installed the right version,bt still it was nt working.
By trail, i reinstalled it was working fine.
Do you the root cause for dis?