Forum Discussion

JAG_CH2555's avatar
JAG_CH2555
New Contributor
9 years ago

TestComplete V11: Object Browser updates the mapping list: some mapping objects are lost !

Hi,

 

In my tested app I use a DevExpress VerticalGridControl which maps 34 rows with 8 columns each (see attached file).

 

If I expand the view to make all rows visible I can map all the RowControl objects. It works fine as long as TestComplete is running.

 

When I close and restart TestComplete the view, by default, does NOT display all the rows. The Object Browser updates the list of the RowControl objects and shrink it. That means that the references of RowControl's indexes 24 to 34 are lost !!!

 

How can I avoid the objects list to remain "as-it-was", or, in other words, how can I let the mapping list unchanged when TestComplete restarts ?

 

Thanks a lot for your help.

  • NameMapping is tricky that way... it maps the object on screen based upon properties, names, etc. So, it sounds like, when the view is collapsed, it's no longer the same object that was previously mapped and so TestComplete doesn't recognize it.

    Best suggestion I can make... it sounds like you are expanding the view outside of TestComplete. Try changing your test so that you open the view and expand it as part of your actual test. In other words, in what you've outlined above, switch the first two items.

     

    • I launch TestComplete
      • start a new recording which set a default value in each control;
      • I use the Down arrow to select the next control
      • save the changes
        • sometimes TestComplete crashes (case #00185186), sometimes not
  • In Tools->Options->NameMapping, turn off the option to update the name mapping during the test run.  TestComplete will then work from your saved copy of the name mapping.

    • JAG_CH2555's avatar
      JAG_CH2555
      New Contributor

      Thank You Marsha for your solution but the option is already turned off.

       

      Please let me explain to You how the problem occurs:

       

      • I open the view and expand it so that ALL controls are visible
      • I launch TestComplete
        • start a new recording which set a default value in each control; I use the Down arrow to select the next control
        • save the changes
          • sometimes TestComplete crashes (case #00185186), sometimes not
      • I run the test; it works fine
      • I close the view, reopen and expand it, run the test again; it works fine
      • I close TestComplete and restart it (the view remains expanded); I run the test again; it works fine
      • I close the view, reopen it and let it in its default size; some controls are hidden; I run the test again
        • the view scrolls down when required to display the next control on the bottom of the grid
        • TestComplete does no longer find the control RowControl13

      The mapped objects have lost their references with the objects in the Object Browser !

       

      Thanks for your help.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        NameMapping is tricky that way... it maps the object on screen based upon properties, names, etc. So, it sounds like, when the view is collapsed, it's no longer the same object that was previously mapped and so TestComplete doesn't recognize it.

        Best suggestion I can make... it sounds like you are expanding the view outside of TestComplete. Try changing your test so that you open the view and expand it as part of your actual test. In other words, in what you've outlined above, switch the first two items.

         

        • I launch TestComplete
          • start a new recording which set a default value in each control;
          • I use the Down arrow to select the next control
          • save the changes
            • sometimes TestComplete crashes (case #00185186), sometimes not