Micro Focus QTP (UFT) Forums
Save scripts from QC to Local Disk-need help with code - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Save scripts from QC to Local Disk-need help with code (/Thread-Save-scripts-from-QC-to-Local-Disk-need-help-with-code)



Save scripts from QC to Local Disk-need help with code - monsuer15 - 02-02-2010

I have lots of scripts in QC which I want to save it onto my Local Disk. I created the below vbs script and ran it from command prompt.

But the code fails at line 15 when it Opens the script in QC.
The error I get is "Cannot open test
800A03EE"


**********************************************

Code:
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtUpdateRunOptions 'As QuickTest.UpdateRunOptions ' Declare an Update Run Options object variable
Dim qtRunResultsOptions 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
Dim blsSupportsVerCtrl ' Declare a flag for indicating version control support

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible

' Make changes in a test on Quality Center with version control
qtApp.TDConnection.Connect "QC_Path", _
"Domain", "Project", "UNAME", "PWD", False ' Connect to Quality Center

If qtApp.TDConnection.IsConnected Then ' If connection is successful
qtApp.Open "[QualityCenter] Subject\Test\Test", False 'Open test in QC ==== TEST FAILS HERE ===========
qtApp.Test.SaveAs "C:\QC Download" 'Save it in File System
qtApp.TDConnection.Disconnect ' Disconnect from Quality Center
Else
MsgBox "Cannot connect to Quality Center" ' If connection is not successful, display an error message.
End If

qtApp.Quit ' Exit QuickTest
Set qtUpdateRunOptions = Nothing ' Release the Update Run Options object
Set qtRunResultsOptions = Nothing ' Release the Run Results Options object
Set qtApp = Nothing ' Release the Application object



RE: Save scripts from QC to Local Disk-need help with code - bela.chuphal - 10-10-2017

(02-02-2010, 08:41 PM)monsuer15 Wrote: I am too getting the issue. Err No -1024 and err.description - The application is too busy to open
**********************************************