'Automation Object Model
'***********************************************************
'**********************************************************
' GAReddy @ OneTestingCenter @ QTP - AOM (Automation Object Model)
' What ==> This is a QTP - AOM Script to Open QTP and to working actions
' How ==> Need QuickTest.Application Automation Object to do so
' Why ==> To Open a Driver Script (which could call other tests)
' To get all the action names in test
' Author : GAReddy @ OneTestingCenter @ QTP
'**************************************************************
'**************************************************************
Dim oQTP
' Open QuickTest
Set oQTP = CreateObject("QuickTest.Application") ' Create the Application object
oQTP.Launch ' Launch QuickTest
oQTP.Visible = True ' Set QuickTest to be visible
oQTP.Open "D:\GAReddy\OneTestingCenter\QTP\AprilBatch\KeywordDrivenFramework\TestScripts\DriverScript", False, False ' Open a test
nActionsCount=oQTP.Test.Actions.Count
For i=1 to nActionsCount
' Get the first action in the test by index (start from 1)
MsgBox oQTP.Test.Actions(i).Name
Next
'Close QuickTest
oQTP.Quit ' Quit QuickTest
Set oQTP = Nothing ' Release the Application object
'*****************************************************************
'****************************************************************
0 comments:
Post a Comment