Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
How to Retrieve value of combo box, textbox that are part of swftoolbar
posted

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")

 

 

 

  • 7695
    Offline posted

    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,