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.
IG : Member [Tools] not valid.
still the same issue i m getting
the controls hierarchy is something like this
window -> toolbar -> ribbon -> tabs -> groups -> tools
hope it could help you in giving solution
Hi,
Can you paste the exact line of code that is giving you the error message "IG : Member [Tools] not valid."? The reason I ask is "Tools" is definitely a valid property on the ToolbarsManager, so I believe something else is going on here.
Now what i want to retrieve the all items in that particular combo box. can u help me in this regard?
I want to check that one of the tool is enabled or not.
I am using following code:
SwfWindow("AVEV Instrumentation").SwfWindow("SwfWindow").SwfToolbar("SwfToolbar").GetNAProperty("Tools[Issue].Value")
It is throwing exception that Tool[Issue] not valid.
I want to check that 'Issue' tool is enabled.
How to use 'EnabledResolved' property in above code?
Please help me out.
Hello Shirkaan,
I created CAS-86241-K7XT7G to assist you with this.