Forum Discussion

snie's avatar
snie
Occasional Contributor
12 years ago

Why don't offer Search method in Object Browser?

Hi There,



I am using TC7.5.2 for the moment.



I have a lot of objects can't be mapped directly, but they are displayed in Object Browser, I need to map them from Object Browser.



How ever, I can't find the one I need directly even I know its name, I have to check the list one by one, I have a long list and it's a waste of time.



It would be great if I can search it in Object Browser.



Thanks,

Shirley

5 Replies


  • Hi Shirley,



    You need to use the Finder Tool in the Object Properties window (Object Spy in TestComplete 8). Documentation on this window can be found in the 'Object Properties Window' help topic.
  • snie's avatar
    snie
    Occasional Contributor
    Hi David,



    Currently I am using TC9 Trail version.



    However I still can't find the search method in Object Browser.



    For me there are some objects can't be captured via Object Spy window, I have to map them from object browser.



    What's good is I can get the names of the objects from our dev team, I wish I could search in object browser by the names so that I don't have to check the list one by one in object browser.



    Is there such a function I didn't find? Thanks for your help.



    Regards,

    Shirley

  • Hi Shirley,



    I am guessing that you are asking not about a possibility to point to a GUI object within the tested application and find it in the Object Browser tree, but search the tree for an object with a specific name from within the Object Browser panel itself. Is it right?



    The object tree in the Object Browser panel is built dynamically. This means that is there is a collapsed node in this tree, its child nodes does not exist. TestComplete will add these objects only when you expand the parent node. Since adding each node causes TestComplete to get information on the corresponding object of the tested application, building the entire process tree can take some time. In order to perform a search within the object tree like you ask, the entire tree including all process trees must be built. This can take very long time and consume too much memory and, therefore, this is just impossible.



    A common way to get an object within the Object Browser tree is to use the Object Spy as I already mentioned. If this approach does not work for you for some reason, could you please explain why?
  • snie's avatar
    snie
    Occasional Contributor
    Hi David,



    Thanks very much for your help and for your explanation.



    Yes what I want is to search the object in the tree with specific name, but seems it's impossible from what you said, and I understand it now.



    Anyway, I will show you one of my cases:

    1. I need to map the buttons in the toolbar, but when I dray the target from object spy to the toolbar, I can only captured the toolbar but can't capture the buttons inside.

    [toolbar buttons.png]

    2. Then I go to Object Browser, after checking very carefully, I can see them in the tree, however they are not under toolbar, but at the same level with toolbar's parents. Strange right? I do think so, after our dev team has confirmed that they design the buttons under the toolbar, I have no idea with it, have to try to map in this way, even very inconvenient.

    [In Object Browser.png]

    3. At the same time, I found the right click menu "Higlight on screen" is disable with the buttons.

     [higlight disable.png]



    That's why I need to do so. Do you have any suggestions with my situation?



    Thanks again,

    Shirley

  • Hi Shirley,



    The toolbar buttons are located at the same level of hierarchy as the toolbar itself since this is how they are located in the actual Delphi application hierarchy. However, this should not produce any problems.



    Anyway, the buttons should be captured by the Object Spy or the Map Object dialogs and they should be highlighted on screen even if they are disabled as in your case. I have just checked this in TestComplete 9 and it works as expected.



    Could you please create a new project with the default settings and record a script that clicks buttons of the toolbar? Please post here the generated script and let me know if it can be executed without problems.