Forum Discussion

Steve_Wiersma's avatar
Steve_Wiersma
New Contributor
13 years ago

Testing Dynamically created tabs

I am trying to write a program that will move through dynamically created tabs and click a forcepayment checkbox in each one.



Currently I have


Set ExceptionTabs = pnlMain.pnlTabs.tabOverShort

count = ExceptionTabs.Tabs.Count



count gives me the number of tabs that are created



my problem lies here, in order to call a tab I can use



Call ExceptionTabs.ClickTab("Over/Short")



but I don't know if that tab exists because it is only created if the account has that property. In the name mapping the tabs are mapped based on where they show up (Tab1, Tab2, Tab3).



Does anyone know how I could either grab the location of Tab1 so that I could call a click on a specific location or

even better would be how to find out the name of the tab that is in the location for Tab1 so that I can call the click tab function to open it.
Attached is a screenshot of the layout I am trying to work with.




 


1 Reply

  • If ClickTab is the TestComplete action (not native object method) then it can work not only with tab names, but also with their indices.

    Try to inspect the ExceptionTabs object - maybe it has some property or method that will give you the information you are missing.