Saturday, January 8, 2011

Basic Automation Object Model script

Automation Object Model is used to automate the QTP tool. we can say that automating the automation tool, by using VbScript containing below code will invoke the QTP tool and open your desired test then run and shows the end results, without touching QTP we are invoking it and automating QTP tool... we can do many settings by using this AOM on QTP.

Upto QTP 9.5, it was difficult to find the Object Model. But, QTP 10.0 have the added feature to show all available methods on parent object.

Basic Automation Object Model script to run QTP Test with Vbscript... copy and paste in note pad and  save with (.vbs) extension.

Dim aom
Set aom = createobject("QuickTest.Application")
aom.WindowState = "maximized"
aom.Open "path of the Test",False,True
aom.Folders.Add("Apath of the folder")
aom.Test.Settings.Run.DisableSmartIdentification 'disable smart Identification
aom.Test.Settings.Resources.Libraries.Add("path of the library files if any (.vbs)") 'Associating library files in settings
Set aom=nothing

"A good threat is worth a thousand tests" - Boris Beizer

No comments: