Forum Discussion

jcalderon's avatar
11 years ago

Problems woking with dynamic child objects

Hi, my name is Quim and I work at a software development company in Spain. First of all I want to apologize for my English.



I'm using the trial version and I have problems running my test with dynamic childs objects.

When our software calls a form its name it window_n; ex. window_1, window_2, etc. Everytime with an incremental number.



In my project options, in TestComplete 9, I marked the Ignore overlapping window check and configured Namemapping to take only the class name and not the dynamic name for the frms. That does not work as I expected. Some components, as memo objects, can't be accesible for the running test. The Keyword Test Log marks two warnings, but is blank (see atached image)  What can Ido?



Kind regards and thank you very much,

3 Replies

  • karkadil's avatar
    karkadil
    Valued Contributor
    When you are talking about window_1, window_2, etc., do you mean that this is the same control, but it is recognized differently during each application run?



    If yes, then leave only one such object in the NameMapping, but change the dynamic part of the property which is changed. 



    For instance, if you have two identical windows with the same controls inside them and the same class name, but in one case its caption is "Window 123", and in other case it is "Window 456", you can use wildcards to replace this dynamic text. Change the caption to "Window *" and TestComplete will always recognize it as one window, nor different ones.
  • I've got this same issue.  Here's the details of my situation:



    First, I record a script where I'm just checking that the proper screens load when selected from a series of nav bar menu items at the top of the screen.  I record it, I replay it, all is well.



    Next, I try to record a series of dynamic links which appear on the left side of the screen (see attached).  These links are dependent on the selection of the nav bar menu items in the previous paragraph.



    And here's where it gets sticky...first, the links are in some sort of object requiring me to manually script Click commands with the coordinates over each link.  Okay, no big deal, I got that working just fine.



    But when I click the next nav bar menu item, and then attempt to create Click commands for the new set of links, the object name appears to have changed as once the script is run TC totally loses track of the object.



    In the Name Mapping I can see where TC has incremented the object name (see attached).



    So there's my problem...how can I keep TC from incrementing the object's name (which it does for no reason I can understand) and get the scripts to work?



    Thanks in advance,



    Mike