Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - What is automation object model(Aom) in qtp?




305
views
asked marvit August 19, 2014 02:39 AM  

What is automation object model(Aom) in qtp?


           

1 Answers



 
answered By Dharma   0  
Automation object model is nothing but collection of objects,methods and properties which are used to perform quicktest operations.Through out this object model we can perform any operation described in QTP interface. For every option in QTP menus(Interface) have Objects,methods and properties are there in this model.
 AOM is the concept to automate QTP itself.

' A Sample Script to Demostrate AOM
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
App.Launch
App.Visible = True

App.Test.Settings.Launchers("Web").Active = False
App.Test.Settings.Launchers("Web").Browser = "IE"
App.Test.Settings.Launchers("Web").Address = "http://easycalculation.com/"
App.Test.Settings.Launchers("Web").CloseOnExit = True

App.Test.Settings.Launchers("Windows Applications").Active = False
App.Test.Settings.Launchers("Windows Applications").Applications.RemoveAll
App.Test.Settings.Launchers("Windows Applications").RecordOnQTDescendants = True
App.Test.Settings.Launchers("Windows Applications").RecordOnExplorerDescendants = False
App.Test.Settings.Launchers("Windows Applications").RecordOnSpecifiedApplications = True

App.Test.Settings.Run.IterationMode = "rngAll"
App.Test.Settings.Run.StartIteration = 1
App.Test.Settings.Run.EndIteration = 1
App.Test.Settings.Run.ObjectSyncTimeOut = 20000
App.Test.Settings.Run.DisableSmartIdentification = False
App.Test.Settings.Run.OnError = "Dialog"


App.Test.Settings.Resources.DataTablePath = ""
App.Test.Settings.Resources.Libraries.RemoveAll


App.Test.Settings.Web.BrowserNavigationTimeout = 60000
App.Test.Settings.Web.ActiveScreenAccess.UserName = ""
App.Test.Settings.Web.ActiveScreenAccess.Password = ""


App.Test.Settings.Recovery.Enabled = True
App.Test.Settings.Recovery.SetActivationMode "OnError"
App.Test.Settings.Recovery.Add "D:\GUITest2\recover_app_crash.qrs", "Recover_Application_Crash", 1
App.Test.Settings.Recovery.Item(1).Enabled = True 

' System Local Monitoring settings
App.Test.Settings.LocalSystemMonitor.Enable = false

' Log Tracking settings

With App.Test.Settings.LogTracking 
	.IncludeInResults = False 
	.Port = 18081 
	.IP = "127.0.0.1" 
	.MinTriggerLevel = "ERROR" 
	.EnableAutoConfig = False 
	.RecoverConfigAfterRun = False 
	.ConfigFile = "" 
	.MinConfigLevel = "WARN" 
End With

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert