Saturday, 28 November 2015

Object Model in TestComplete (Automation Testing)

As a automation Tester, we all are following the Object model for automating the application but we won't be able to classified those object model based on uses. Most of the automation testers are having doubts the Object Model. In TestComlete or in Automation we are using below object model-
 
1- Component Object Model (COM) :-
2- Document Object Model (DOM)
3- Automation Object Model (AOM)
4- Test Object Model (TOM)

 
Let's have a quick view of each object model with classification..
 

Componenet Object Model (COM)

 Example-

 Set Obj = Sys.OleObject("Word.Application")
 Set Obj = CreateObject("Excel.Application")
 Set FSO = CreateObject("Scripting.FileSystemObject")

 

Document Object Model (DOM)

 Example -
 
 Set pageTitle = Sys.Browser.Page("http://google.com/").contentDocument.title
 Set ObjTextBox = Sys.Browser.Page("http://google.com/").FindChildByXpath("//input[@name='q']",Treu)

 

Automation Object Model (AOM)

 Example -

 Set objTestComplete = CreateObject("TestComplete.TestCompleteApplication")

 

Test Object Model (TOM)

 Test object model is a combination of Test Object and Run object information of the objects.