how to retrive the value of combobox, texbox that are part of the swftoolbar
for e.g. if my toolbar cotains one combobox
1. i select particular value in the combo box
2. then i click the apply button
now wht i want, i want to retrive the selected value. as my qtp recognises only swftoolbar and not the individual controls in it.
i tried to check the function getItemProperty i am getting error:
parameter key not found.
SwfWindow("").SwfToolbar("").GetItemProperty(toolbarname,strtool,"Enabled")
Correct QuickTest Professional(QTP) only really interacts with objects that derive from System.Windows.Forms.Control. The tools internal to the Infragistics UltraToolbarsManager are not controls, they are just abstract objects that may resemble controls. The UltraToolbarsManager itself is not a tool either, but a component, but is typically housed on a custom dockarea or a custom popup window, and that is the control we generally interact with as far as QTP is concerned.
That being said, you should be able to generally still get the current property values via the base Tools collection. Such as :
msgbox SwfWindow("").SwfToolbar("").GetNAProperty("Tools["+strToolKey+"].Value")
This should work primarily because all tools regardless of where they are located are just instances of the root tool in the Tools collection. All values, if there the tool has a value, are thereby shared with all instances of the root tool.
If it cannot find it there, it could possibly be an MDIMerged tool, ie a tool that existed on a parent window, that was merged down the the ToolbarsManager on a child window, and you are trying to interact with it on the Child window. In that case you would need to access it slightly differently:
msgbox SwfWindow("").SwfToolbar("").GetNAProperty("MergedTools["+strToolKey+"].UnderlyingTool.Value")
I hope this offers you a valid solution,
for the first solution its giving error as:
IG : Member [Value] not valid.
Hi,
i tried with both the things but geeting exception error as:
IG : Getting property value for [MergedTools[""].UnderlyingTool.Value] throws the following exception: Key not foundParameter name: key
for the second solution