Micro Focus QTP (UFT) Forums

Full Version: How do i click various tabs in a vbapplication using qtp?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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
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...