Powered by: Dharamveer Saxena

Wednesday, November 4, 2009

TestComplete : To make a perticular tab selected (Infratistics Ultratabcontrol)

In infragistics Ultratabcontrol clicktab() method do not work correctly to make a tab selected or active. It gets recorded but at the time of play, the testcomplete does not click on the tab.

In this case you can use the following procedure to select a tab.

'--------------------------

'tabcontrol is the name of ultratabcontrol object
'tabname is the name of tab (string)

sub tab_click(tabcontrol, tabname)
dim I
for I = 0 to tabControl.Tabs.Count-1
if tabControl.VisibleTabs.get_Item(I).Text.OleValue= cstr(tabname) then
tabControl.VisibleTabs.get_Item(I).Selected = true
end If
Next
end Sub

'------------------------------------------

No comments:

Post a Comment