Forum Discussion

mante_bos's avatar
mante_bos
New Contributor
12 years ago

Name Mapping to different objects





In my application under test, I have a screen with 4 tabs, a txtSearchBox and a grid.

When selecting a tab, different data is shown in the grid, but the txtSearchBox and the grid seem to be the same.



However, TestComplete creates different objects for the grid and txtSearchBox for every tab. So in the object browser I see something like this:


  • Tab1


  •    txtSearchBox


  •    grid


  • Tab2


  •    txtSearchBox


  •    grid




The only difference is that Tab1 and Tab2 have a different name. The subelements are exactly the same. But if Tab1 is selected, Tab2.grid is cannot be found/highlighted.



Is it possible to make an object like


  • Tab


  •    txtSearchBox


  •    grid


That would recognize/highlight the txtSearchBox and the grid, whichever tab is selected?

I hope it is clear what I mean.



Thanks in advance















2 Replies

  • mante_bos's avatar
    mante_bos
    New Contributor
    Hi



    In the object browser, only the MappedName and the Name properties are different. But both fields are not editable.



    For the name mapping, I tried the following things:


    • Only select on the property NativeClrObject.Name. Which has the value UltraTabPageControl1  (under other tabs the 1 is replace by 2, 3 or 4) and use a wildchar for the variable. This does not work


    • I tried to select only the properties that are identical between all the objects, but still the grid is only recognized when the right tab is selected


    • I tried to add conditional mapping (NativeClrObject.Name = UltraTabPageControl1 or NativeClrObject.Name = UltraTabPageControl2), but still the grid is only recognized when the right tab is selected


    Any other suggestions?