Forum Discussion

ruarig's avatar
ruarig
New Contributor
13 years ago

UltraToolbarsDockArea control toolbars not recognised

Hi,

I am having problems handling some infragistic toolbars from Test Complete.

Basically we have an application which has Infragistic toolbars inside of an UltraToolbarsDockArea.



I can only map down as far as the Dock area however object recognition is not picking up the text attached to the control.



I have also tried using text recognition however again this is picking up nothing lower than the UltraToolbarsDockArea.



If I dig down manually using the kown structure of the infragistics control I can see the items I need to access to click but at this level there are no click or double click methods.



Can any one advise how best to handle this?



I really don't want to use the x y co-ordinates if I can help it but that's currently my only work around.



Thanks in advance for any help.


  • ruarig's avatar
    ruarig
    New Contributor
    I found a solution to this:

    I was able to find the button item by going through the toolbarsmanager.toolbar.tools.Item_2(Item) properties.



    On setting that as an object in my script I got the X and Y bounds of the button object and used those to identify where to click for the button.



    N.B. to click the middle of the button and ensure the click is on the button I added bounds width to the X position and bounds height to the Y position, then divided them both by 2.



    var x = button.Bounds.X + button.Bounds.Width / 2;


    var y = button.Bounds.Y + button.Bounds.Height / 2;