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")
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,
Key not found in the MergedTools collection means that it is not a merged tool, so that rules that logic out. As to the Tools[strToolKey].Value not working. Since it didn't give you a Key not found exception, means it did find the tool. Just that the tool in question doesn't have a value property. The question is why? Are you looping through all of the tools, and since some Tools don't inherently have a Value property the error is thrown? If you are only interacting with only one Tool, that tool then isn't one of the following: ComboBoxTool FontListTool MaskedEditTool
So the question is what is the tool type, and from that we can determine what properties are appropriate. If your are working with TestAdvantage 10.3 or later, you should also have access to GetNAProperties, which will give you a list of all available properties during runtime on the instance of the object that you are looking at. So you can do something like the statement below and it will list all the available properties and their return types.
msgbox SwfWindow("").SwfToolbar("").GetNAProperties("Tools["+strToolName+]")
I hope this helps,
for the first solution its giving error as:
IG : Member [Value] not valid.
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