'Automation Object Model
'********************************************************************
'********************************************************************
' GAReddy @ OneTestingCenter @ QTP - AOM (Automation Object Model)
' What ==> This is a QTP - AOM Script to Open QTP and to working with QTP Batch Tests
' How ==> Need QuickTest.Application Automation Object to do so
' Why ==> To number of tests (one by one )
' Author : GAReddy @ OneTestingCenter @ QTP
'******************************************************************
'******************************************************************
Set oQTP = CreateObject("QuickTest.Application")
oQTP.Launch
oQTP.Visible = True
oQTP.WindowState = "Maximized" ' Maximize the QuickTest window
oQTP.ActivateView "ExpertView" ' Display the Expert View
'oQTP.open "D:\OneTestingCenter\QTP\GAReddy@DemoTests\QTP_PageInfo", False
'Opens the test in editable mode
Dim QTP_Tests(4)
QTP_Tests(1)="D:\OneTestingCenter\QTP\GAReddy@DemoTests\QTP_PageInfo"
QTP_Tests(2)="D:\OneTestingCenter\QTP\GAReddy@DemoTests\QTP_WebEditInfo"
QTP_Tests(3)="D:\OneTestingCenter\QTP\GAReddy@DemoTests\QTP_RadioGroupInfo"
QTP_Tests(4)="D:\OneTestingCenter\QTP\GAReddy@DemoTests\QTP_ImagesInfo"
Set QTPResultsOptions=CreateObject("QuickTest.RunResultsOptions")
For i=1 To UBound(QTP_Tests)
oQTP.Open QTP_Tests(i), True
QTPResultsOptions.ResultsLocation=QTP_Tests(i)& "\Res1"
oQTP.Test.Run QTPResultsOptions, True
oQTP.Test.Close
Next
oQTP.Quit
Set QTPResultsOptions=Nothing
'Set QTP_Tests=Nothing
Set oQTP=Nothing
'***************************************************************
'***************************************************************