08-11-2015, 12:35 AM
I am executing multiple QTP scripts via a Windows Script batch file and Windows Scheduler. One of the multiple scripts listed in the batch file use the SAP Add-in, while the others do not. Is there anybody out here that knows how to select and/or remove Add-ins from the Add-in Manager at run-time? Here's the Script code:
Is there a better method than this? Any help is appreciated.
Code:
Const strEnvironment = "QA"
Const strBatchSetLoc = "[location]"
'---------------------------------------------------------------------------------------------
Dim qtApp, qtTest
Set qtApp = CreateObject("QuickTest.Application")
'Set ObjCmd = createobject("wscript.shell")
qtApp.Launch
qtApp.Visible = True
qtApp.Open (strBatchSetLoc&strEnvironment&"\[test name 1]"), True
Set qtTest = qtApp.Test
qtTest.Run
qtTest.Close
qtApp.Open (strBatchSetLoc&strEnvironment&"\[test name 2]"), True
Set qtTest = qtApp.Test
qtTest.Run
qtTest.Close
...
'---------------------------------------------------------------------------------------------
qtApp.quit
Set qtTest = Nothing
Set qtApp = Nothing
Is there a better method than this? Any help is appreciated.