02-02-2010, 08:41 PM
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"
**********************************************
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