QTP Forum


Join the forum, it's quick and easy

QTP Forum
QTP Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Poll
Keywords

Latest topics
» composite primary key
How to Upload a file to Quality Center (QC/ ALM) EmptyThu Jun 19, 2014 11:31 am by thomasdfg

» How to identify the object when it is dynamically changing behavior
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 6:37 pm by thomasdfg

» Patches for QTP 10, 11, 11.5
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 6:04 pm by thomasdfg

» Retrieving data from Txt file into datatable
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 5:32 pm by thomasdfg

» VB Script to count number of links in a web page.
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 4:51 pm by thomasdfg

» Customized HTML reports in QTP
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 4:42 pm by thomasdfg

» how to print values into a field of a web page, from a data table in qtp?
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 4:37 pm by thomasdfg

» How to delete cookies using QTP?
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 4:30 pm by thomasdfg

» When UFT Does Not Identify an Object
How to Upload a file to Quality Center (QC/ ALM) EmptyWed Jun 18, 2014 4:23 pm by thomasdfg

April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar

Affiliates
free forum


How to Upload a file to Quality Center (QC/ ALM)

Go down

Vote if this topic was useful to you

How to Upload a file to Quality Center (QC/ ALM) Vote_lcap0%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 0% 
[ 0 ]
How to Upload a file to Quality Center (QC/ ALM) Vote_lcap0%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 0% 
[ 0 ]
How to Upload a file to Quality Center (QC/ ALM) Vote_lcap100%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 100% 
[ 1 ]
How to Upload a file to Quality Center (QC/ ALM) Vote_lcap0%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 0% 
[ 0 ]
 
Total Votes : 1
 
 

How to Upload a file to Quality Center (QC/ ALM) Empty How to Upload a file to Quality Center (QC/ ALM)

Post by Gajre Wed Oct 10, 2012 12:34 am

'Assigning the Values to the variables or directly give them during calling the function as respective arguments.
QCFileName = "GajreResults" 'This is the Name of
the Resource in the Test Resource folder of QC--This should the available in QC.
LocalUploadFolder = "D:\Gajre\Test Execution Results" 'Local System Folder
LocalUploadFile = "ResultsLogfile.xls" 'File to be uploaded
QCResourceType = "Data table"

call UpLoadFileToQC(QCFileName,LocalUploadFolder,LocalUploadFile,QCResourceType)

Function UpLoadFileToQC(QCFileName,LocalUploadFolder,LocalUploadFile,QCResourceType)
On Error Resume Next
oSubFlag = false
Set oResourceFactory = QCUtil.QCConnection.QCResourceFactory
Set oRoot = oResourceFactory.NewList("")
Set oSub = Nothing
iTotalItems = oRoot.Count
For ItemCtr = 1 To iTotalItems
CurItem = oRoot.Item(ItemCtr).Name
If UCase(CurItem) = UCase(QCFileName) Then
Set oSub = oRoot.Item(ItemCtr)
oSubFlag = true
Exit for
End If
Next
Set oRoot = Nothing
Set oResourceFactory = Nothing
If oSubFlag Then
oSub.Refresh
oSub.FileName = LocalUploadFile 'This is the file Which is der in the UploadFolder Path
oSub.ResourceType = QCResourceType 'Example: oSub.ResourceType = "Data table"
oSub.Post
oSub.UploadResource LocalUploadFolder, true
Set oSub = nothing
End If
End Function


Last edited by Gajre on Wed Oct 10, 2012 12:58 am; edited 1 time in total
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 41
Location : Hyderabad

https://qtpelearning.forumotion.com

Back to top Go down

How to Upload a file to Quality Center (QC/ ALM) Empty Re: How to Upload a file to Quality Center (QC/ ALM)

Post by Gajre Wed Oct 10, 2012 12:40 am

You can upload any type of files based on the QC Resource Type.
for example to upload a library you will have to pass/ assign the "Function library" (please check in QC resource type and correct it the spelling is wrong) value to QCResourceType variable/ argument

Similarly to upload ObjectRepository or a .tsr file, pass/ assign the "Shared Object Repository" (please check in QC resource type and correct it the spelling is wrong) value to QCResourceType variable/ argument

so on for other resource types...Wink
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 41
Location : Hyderabad

https://qtpelearning.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum