I am currently trying to download QTP scripts stored in BPT components from QC to my local drive using the OTA API. I am able to access the individual BPT components using ComponentFactory and Component, but am unable to find out where the QTP script is stored. I see two solutions to this problem (though I dont know both of them [img]/images/graemlins/tongue.gif[/img]):
1. Accessing the QTP file directly from the QC server.
2. Opening the script in QTP by providing the file path and saving it from QTP.
Does anybody have a better solution to this. A simple implementation or guidance will be greatly appreciated.
strPath=extStor.Load("-r Script.MTS",True)'downloads only .mts files
'strPath=extStor.Load("-r\*.*",True) 'if U want all the files of component
'Disconnect from the project
if tdc.Connected Then
''Log off the server
If tdc.LoggedIn Then
''Release the TDConnection object
Set tdc = Nothing
Set rootCFolder =Nothing
Set rootComponentFolderFactory =Nothing
Set rCFFList =Nothing
Set ICFF =Nothing
Set ICFFList =Nothing
Set ICFFItem =Nothing
MsgBox "BackUp Done!"
Please feel free if you have any doubts in the script.
Re: How 2 downld QTP scripts from BPT cmpnts with OTA
I have gone through the code. Even I try to execute the script but it is throughing me an error OTA server not connected.
I need to create an object for Business to increase iteration count for a group of components.