' Author: Mohamed Ali
' Date: 01/08/06
' Date: 01/08/06
'CAUTION: USE THIS SCRIPT WITH EXTREME CARE SINCE
IT ACCESSES QC.
'Note: QTP Must be open and QC connection must be
setup BEFORE running this script
Const QTPPath = "G:\"
Const QCPath = "[QualityCenter] Subject\Automation\"
Dim qtApp, objFSO
Set qtApp = CreateObject("QuickTest.
Set objFSO = CreateObject("Scripting.
Set objFolder = objFSO.GetFolder(QTPPath)
Set colListOfFiles = objFolder.SubFolders
'open qtp if it isn't already open
qtApp.Visible = False
On Error Resume Next
If qtApp.TDConnection.IsConnected Then ' If connection is successful
On Error Resume Next
If qtApp.TDConnection.IsConnected Then ' If connection is successful
For Each objFile in
colListOfFiles
'open temp locally then save file to QC
qtApp.Open QTPPath & objFile.name
qtApp.Test.SaveAs QCPath & objFile.name, True
Next
'open temp locally then save file to QC
qtApp.Open QTPPath & objFile.name
qtApp.Test.SaveAs QCPath & objFile.name, True
Next
Else
MsgBox "Please Setup QTP Connection to Quality Centre"
End If
On Error GoTo 0
MsgBox "Please Setup QTP Connection to Quality Centre"
End If
On Error GoTo 0
how should be handle for overwrite scripts. If the scripts are already exists then how to overwrite it
ReplyDeleteThis comment has been removed by the author.
ReplyDelete