ALERT! The community will be read-only on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only on April 19, 8am Pacific as the migration begins.Read more for important details.
Absent Member.
Absent Member.
1104 views

Error while uploading Attachments under Test Plan using QC OTA

Hi ,

 

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?

0 Likes
2 Replies
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Just checking,

 

Are you providing all the variables? 

qcURL, strUserName, strPassword,strDomain, strProject, strTestPath and strClientPath ?


Thanks,
Anil Nandam.
0 Likes
Absent Member.
Absent Member.

Hi Anil,

 

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?

 

Thanks 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.