Working with TTabSet in TestComplete scripts
I am attempting to click a TTabSet tab for our Delphi application via VBScript (used in test automation) but am having difficulty doing so without using page coordinates. Does anyone have experience using this tab class?
Using 开发者_JAVA百科TestComplete's Object Spy, I can view the RTTI - TabIndex of each tab but I cannot seem to pass it into a clicktab method to select it (TestComplete reports the error that it cannot find the tab and that 0 items exists).
I have asked the people who created TestComplete and they said that TTabSet is not a supported tab control but it was suggested that perhaps I can use some of TTabSet's native methods to get it working for me.
Any ideas?
TabIndex
is read-write, so you can do:
tabSetObj.TabIndex = 2 ' Select tab with index 2
As per the docs, the effect should be the same as if you actually clicked on that tab:
When a value is assigned to TabIndex, the OnClick event for the tab set occurs, followed by the OnChange event, just as if the user had clicked on a new tab.
精彩评论