Micro Focus QTP (UFT) Forums
How do i click various tabs in a vbapplication using qtp? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How do i click various tabs in a vbapplication using qtp? (/Thread-How-do-i-click-various-tabs-in-a-vbapplication-using-qtp)



How do i click various tabs in a vbapplication using qtp? - phanindranath - 12-02-2009

Hi All,

I am automating a VB application, where in there is a scenario, where i should click on different tabs in a vbwindow. All the tabs are recognized by QTP as Activex class and its progid is TabDlg.SSTab.1. Now i want to click on other tabs but all the tabs are showing the same progid.
When i recorded the action (clicking on two different tabs) using qtp, i am getting the code as below:
VbWindow("SRMAIN").ActiveX("VbTab_InsuredInfo").Click 116,11
VbWindow("SRMAIN").ActiveX("VbTab_InsuredInfo").Click 178,8
Can anyone help me how to handle such scenarios using QTP or vbscript?


RE: How do i click various tabs in a vbapplication using qtp? - phanindranath - 12-03-2009

Hi All
Please can anyone help me on this query ?
I have tried with many options but still could not handle the situation.
Thanks in Advance
Phanindra


RE: How do i click various tabs in a vbapplication using qtp? - basanth27 - 12-08-2009

Phani -
Well, one of the common issues we face with QTP interacting with various custom built applications is the hindrance to identify the objects uniquely. In this case you have to ways to achieve what you want,

1. Identifying the unique feature of each tab. ( Indexing should help. If it does not work try Location. If no help try to contact the developers to see if there any unique property is set. Most of the times it ends with indexing as the one. You can define the tab contents as collection of child tabs and then click each child tab. Let me know if this idea helps you. Research more and you will find more.]

2. Co-ordinate Identification - Death option. Last resort when you do not have solution and you need to get the achieved automation. [ Use SetCursorPos API, DeviceReplay, etc etc and it should help you ].

Let me know how the flood flows through...