Confusion between DOM and TreeView model
Hi,
I am very new to Test Complete and have found
the tool very useful in trying to automate our web applications. I have gone
through the online documentation provided and I feel I have understood the
basics of the Object model used by TC. However , I am still a bit confused
about the usage of DOM or TreeView model for the objects. I do understand that
Treeview model is faster and I can also feel that the test execution is quite
slow as I am using DOM model. I am writing down the reason I thought of using
DOM model and if someone can show me how to do the same using Treeview model
then it will be really helpful
When I use TreeView model the object is
recorded as follows
Call Aliases.IEXPLORE. pageSearchResultsCom.formAspnetform.panelFc.panelContent.panelBodyContainer.panelBodyContainerBody.panelFullwidth.panelCtl00Cp1Pnlf1home.panelSearchClear.panelSearch.panelFcContentClear.panelClear.panelSearch1.textboxCtl00Cp1
ucSearchPanel3SmartSearchTxt.SetText("london")
And when I use DOM mode it is recorded as
Call Aliases.iexplore.pageSearchResultsCom.document.all.Item("ctl00_cp1_ucSearchPanel3_txtSmartSearch").SetText("Paris")
As you can see the Treeview model gives me a long physical name to handle with
whereas the DOM model gives a short name(for the obvious reason that there is
no hierarchy). But with the DOM model I can create an alias and reduce the name
to below
Aliases.InternetExplorer.MainPage.ObjectBrowser.SearchText.SetText("London")
Is there some way to reduce the physical
name of the object using Treeview Model to such a small line?
Any help will be greatly
appreciated as I am really struggling here to get this workingL
Thanks,
Shiv