Forum Discussion

gcarlson's avatar
gcarlson
New Contributor
14 years ago

Cannot see Powerbuilder Toolbar buttons

Hi,



We are evaluating TC (v8) for our application built in Powerbuilder (v11.5.1) - and so far it's going very well - using the MSAA API to 'see' the non-standard PB objects.



However we are now stuck with automating Toolbar button clicks - as there doesn't seem to be any way to directly reference the individual buttons on the toolbars. The recorder will record x-y position Clicks - but this is not great as the structure of the toolbars can change at runtime depending on user permissions, etc.



The toolbar itself shows up in the Object Browser as  Window("FNFIXEDBAR115","",1) - I'm pretty sure that it's a custom class specific to PB - and unfortunately doesn't have any MSAA properties.



The recorder records for a button click:  Call Aliases.PB115.wndFNWND3115.FNFIXEDBAR115.Click(124, 11)



Just hoping that someone may have been able to solve this problem.



Unfortunately it's a show stopper as the corresponding menu item for each toolbar button is not always visible and so cannot be used in place of the toolbar.



cheers,

Grant.

6 Replies

  • geetha015's avatar
    geetha015
    Occasional Contributor
    Hi carl,

            

                   did you checked out that your powerbuilder data window have accessble name .(It will be in Datawindow Properties->Othertab->aessble name) something like that will be. and also your tc IDE setting should be like this.At Project level(rightclick on project->Edit->Properties->Open Applications->MSAA under this you need to add an item name pbdw* and check that item). By maintaining these setting you can easily Identify the Controls in you datawindow and also it provides the access to the Controls in the Datawindow. Please try with this.





    Regards

    gita
  • gcarlson's avatar
    gcarlson
    New Contributor
    Hi gita,



    Yes - we have all controls including datawindows working through the MSAA API.



    The problem we are having is with Toolbar buttons - they do not seem to have MSAA properties that can be set in Powerbuilder - and so they do not appear to be visible to TC.



    cheers,

    grant.
  • Hi,



    Try adding the toolbar's window class to the 'Win32 Controls and Windows | Tool Bar' Object Mapping group (see the "Object Mapping" help topic).
  • geetha015's avatar
    geetha015
    Occasional Contributor
    hi carl,

              Haave you added tha onewhich was specified byjfred. If so please let me know whether it's working 5n or not?
  • gcarlson's avatar
    gcarlson
    New Contributor
    Hi,



    Yes we added the FNFIXEDBAR115 class to the Win32 Controls object mapping - still no luck.



    There are additional Extended properties and methods shown when the toolbar is mapped to the Win32 Toolbar - but I don't believe they are working, ie: the wButtonCount property is 0 even though there are visible buttons on the toolbar.



    cheers.
  • Hi,



    OK, in this case, you can try using Text Recognition (see the "Using Text Recognition Technology" help topic).



    Before you try this, add the FNFIXEDBAR115 class to MSAA properties of your project (if it is not added there) and check what happens.