I'm using QTP 9.2 on a Windows .Net application and it won't recognize a SwfTab("UltraTabControl") when I record clicking on it. There are three tabs in our application and I've tried clicking on each tab, even to the extent that the text on each tab is activated, but all I can get QTP to record is the following:
SwfWindow("Company").SwfWindow("Purchase Order").Activate
When I use the .Net Windows Form Spy to spy on the tabs, it indicates that the tabs are "SwfTab: TabControl". I've tried replacing the "Activate" with "SwfTab("TabControl").Select"Items", but I get a Run Error from QTP that indicates the "TabControl" object was not found in the Object Repository. I then tried the "Update from Application" option in the Object Repository, but I get the error that the object that was selected in the application is not of the same class as the object selected in the object repository (object classes do not match).
I'm using TestAdvantage for Windows Forms 2006 Volume 2 (CLR 1.x), so any help someone can give me will be appreciated.
I was able resolve the problem by recording a Standard Checkpoint on the tab, which put the SwfTab("TabControl") in the Object Repository and resulted in the following: SwfWindow("Company").SwfWindow("Application").SwfTab("TabControl").Check CheckPoint("TabControl").
I then changed the .Check CheckPoint("TabControl") portion to .Select "TabName" and QTP was able to recognize and click on the tab as expected.
If anyone has a better solution, please let me know!
Dennis,
Good that you got this one resolved. on a side note, always record an action on the control you are trying to work on to force it to get added to the object repository. If recording an action does not add it to the OR try opening the object repository window and choose "Add test object"
Regards,
Ammar
Hi,
Even I'm facing same issue. When I record it "SwfTab" is coming, When I add same through Spy it is coming as "SwfObject" .
Please help how to switch between tabs in "Infragistics.Win.UltraWinTabControl.UltraTabControl"
I am also facing this issue....