Invoke Comboselchange event (Activebar)in QTP
Application :VB 6
In our Application we have Active bar Control 220.127.116.11 (ActiveX).Within this we have following Tools
1. Combobox (4 combobox)
I am finding difficult to perform action on this control
Issues that we faced
1. QTP Cannot identify the object (combobox) while spying.Its showing only the parent object i.e Window
2.while Recording on three combo box we get the following code
Window("Form1").Window("Window").WinComboBox("Comb oBox").Select "4"
Window("Form1").Window("Window").WinComboBox("Comb oBox").Select "9"
Window("Form1").Window("Window").WinComboBox("Comb oBox").Select "1944"
While playback QTP throws the following error
"Cannot find the “Combo box” object’s parent “Window(class Window)”.Verify that parent properties match an object currently displayed in your application"
Then we tried to ADD OBJECT in object repository…likely we got the object ACTIVE BAR in the object repository .
Here ,we tried to perform action on ActiveBar Class by using in build method we couldn’t succeed.We tried with Descriptive programming also ….but still …we couldn’t…
Then we got the Activebar.OCX file ,from which we came to know two things
Here in this active bar we have one band and under this we have 12 tools……so we tried with following code
Set oactive=VbWindow("mdiMain").VbWindow("frmLongTerm" ).ActiveX("ActiveBar Class").Object
msgbox band_count&" band_count"
msgbox tool_count&" tool_count"
For i=0 to tool_count-1
‘ From this we got , which tool id is combobox and button.Here Tool id =0 is a combo box with the name “cboLongTerm”
‘I tried to perform select method on this combo box but QTP didn’t support this,So I tried to change the text by the following code where we succeed in changing the text alone……but the event is not fired.
After this ,I went through the ACTIVEBAR.OCX file (by opening through PE Explorer)
Where I have come across an event called “COMBOSELCHANGE”…..but I don’t know how to use it in the script.
For Sreen shots and Activebar.OCX file ,refer the attachment
Can you help regarding this………..