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
315
How to identify if a button is enabled or disabled on a swftoolbar
posted

Hello All,

                I am working on a .Net Application with QTP 9.2 and infragistics testadvantage 2006 Volume 1 VLR 2.0. I have a swftoolbar on which are certain buttons. I would like to check for a particular button wether it is enabled or disabled and then dependingly click on it. Here is how it records the toolbar,

 Browser("Browser").page("PAGE").frame("frame").swfobject("selection page").swftoolbar("tools").clicktoolbartool "ToolBar","Btnclick"

I tried the .Net windows forms spy but i wasnt able to obtain any property which was helpful in finding the enable/disable property.

Can anyone please look through and revert back ASAP.

 

Thank you all for your help.

 Regards,

Rob

Parents
No Data
Reply
  • 7695
    Offline posted

     Hi Rob,

        To retrieve a property of a tool on the UltraToolBarsManager use the GetItemProperty method. This allows you to retrieve any public property off of the Tool object. To know what properties are available to retrieve you can look to our online help. Here's the link directly to the 8.2 ToolBase Object. In the case of how to determine if the Tool is Enabled you can use the EnabledResolved property as shown below.

    Set oTBManager = SwfWindow("Root").SwfToolbar("_Root_Toolbars_Dock_Area_Top")
    strPathToTool = "RootMenu,V81,V81_WinListView"
    strToolKey = "V81_WinListView_Size2Fit"
    strPropertyName = "EnabledResolved"

    oTBManager.GetItemProperty strPathToTool, strToolKey, strPropertyName
     
Children