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 Download a file from Quality Center (QC/ ALM) to local machine EmptyThu Jun 19, 2014 11:31 am by thomasdfg

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

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

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

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

» Customized HTML reports in QTP
How to Download a file from Quality Center (QC/ ALM) to local machine 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 Download a file from Quality Center (QC/ ALM) to local machine EmptyWed Jun 18, 2014 4:37 pm by thomasdfg

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

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

April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar

Affiliates
free forum


How to Download a file from Quality Center (QC/ ALM) to local machine

Go down

Vote if this topic was useful to you

How to Download a file from Quality Center (QC/ ALM) to local machine Vote_lcap50%How to Download a file from Quality Center (QC/ ALM) to local machine Vote_rcap 50% 
[ 1 ]
How to Download a file from Quality Center (QC/ ALM) to local machine Vote_lcap0%How to Download a file from Quality Center (QC/ ALM) to local machine Vote_rcap 0% 
[ 0 ]
How to Download a file from Quality Center (QC/ ALM) to local machine Vote_lcap50%How to Download a file from Quality Center (QC/ ALM) to local machine Vote_rcap 50% 
[ 1 ]
How to Download a file from Quality Center (QC/ ALM) to local machine Vote_lcap0%How to Download a file from Quality Center (QC/ ALM) to local machine Vote_rcap 0% 
[ 0 ]
 
Total Votes : 2
 
 

How to Download a file from Quality Center (QC/ ALM) to local machine Empty How to Download a file from Quality Center (QC/ ALM) to local machine

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

'Assign values to the variables or pass then during the function call, as arguments.
Shortfilename = "GajreFuncLibrary" 'This the file name in the QC, which you want to download.
destinationpath = "D:\Gajre\QC Temp Folder" 'Local folder path to which you want to download.

call DownloadQCResourcefile(Shortfilename,destinationpath)

Public Function DownloadQCResourcefile(Shortfilename,destinationpath)
On Error Resume Next
DownloadQCResourcefile = -1
Set oTDC = QCUtil.QCConnection
Set oResourceFactory = oTDC.QCResourceFactory
Set oRoot = oResourceFactory.NewList("")
iTotalItems = oRoot.Count
For ItemCtr = 1 To iTotalItems
CurItem = oRoot.Item(ItemCtr).Name
If UCase(CurItem) = UCase(Shortfilename) Then
Set oSub = oRoot.Item(ItemCtr)
Exit For
End If
Next
Set oRoot = Nothing
Set oResourceFactory = Nothing
Set oTDC = Nothing
If Not Isempty(oSub) Then
oSub.DownloadResource destinationpath, True
End If
If err.number<>0 Then
Exit Function
DownloadQCResourcefile=0
End if
Set fObj = nothing
Set oSub = nothing
on error goto 0
End Function
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