05-19-2012, 12:01 AM
Hi all,
Help needed on understanding the Properties and Methods related to a ActiveX control.
I am working on Automating a legacy application(developed using VB 6.0 and FarPoint ActiveX controls)using QTP Ver 11 (with ActiveX, VB, .Net Add-ins..
Here is a piece of script written by one of x-team mates (who left the organization), to get the caption of available menus and sub-menus in the Sidebar (it is an ActiceX control)
I’m able to understand the flow of the script. A reference object “objMainMenu” has been created in the first line. ActiveX “.Object” is being used to get access the Native property “.Group”
I have no clue on how the other properties / methods are identified and being used ( like objMainmenu.item(i).caption ; objMainmenu.item(i).listitems.item©.text ) in the script.
Are there anyways to figure out all the available properties & methods related to “objMainMenu” ?
Can someone please help me?
Note:
I ran the script in debug mode.. and used QTP’s “Add to watch” feature to see the reference object (objMainMenu) properties by expanding the object. But it did NOT work. On run-time, under the “Add to watch” section - the objMainMenu just showed as “object”.
Thanks!
DhivaM
Help needed on understanding the Properties and Methods related to a ActiveX control.
I am working on Automating a legacy application(developed using VB 6.0 and FarPoint ActiveX controls)using QTP Ver 11 (with ActiveX, VB, .Net Add-ins..
Here is a piece of script written by one of x-team mates (who left the organization), to get the caption of available menus and sub-menus in the Sidebar (it is an ActiceX control)
Code:
set objMainmenu = VbWindow("frmC2000").ActiveX("SSListBar").Object.Groups
For i=1 to objMainmenu.count
print "Main Menu = " & objMainmenu.item(i).caption
For c= 1 to objMainmenu.item(i).listitems.count
print "Sub Menu = " & objMainmenu.item(i).listitems.item(c).text
Next
Next
I’m able to understand the flow of the script. A reference object “objMainMenu” has been created in the first line. ActiveX “.Object” is being used to get access the Native property “.Group”
I have no clue on how the other properties / methods are identified and being used ( like objMainmenu.item(i).caption ; objMainmenu.item(i).listitems.item©.text ) in the script.
Are there anyways to figure out all the available properties & methods related to “objMainMenu” ?
Can someone please help me?
Note:
I ran the script in debug mode.. and used QTP’s “Add to watch” feature to see the reference object (objMainMenu) properties by expanding the object. But it did NOT work. On run-time, under the “Add to watch” section - the objMainMenu just showed as “object”.
Thanks!
DhivaM