Forum Discussion

lsainsbury's avatar
lsainsbury
Contributor
10 years ago
Solved

Name Mapping assigns random numeric value to same fields with different values

Hey guys/girls



So I'm still having a little issue with my data-driven loop, basically my loop checks data from a floating window which is displayed everytime I load up a drawing in our Software.



I've managed to figure out that even though it is the same window, TestComplete is assigning a numeric value at the end of the mapped field if the value of the field changes, thus eventually making my test fail when it loops.



For example, TImpactEntryEdit, TImpactEntryEdit2, TImpactEntryEdit3. Where the WndCaption value changes our Aliases are being duplicated like this with a number at the end.



Is there any way to stop this from happening?



Edit:



I think I may be able to use Wildcards, but I don't really know much about them yet :)
  • Hi,



    If you always want any window of class TImpactEntryEdit to map to the same object, regardless of the field/caption value, then just remove the WndCaption property from the mapping rule (leaving only property WndClass).

    See http://support.smartbear.com/viewarticle/57331/ for how to do this.



    If the logic is more complex, then you may need to use wildcards and/or other properties.



    Regards,

    Paul

2 Replies

  • Hi,



    If you always want any window of class TImpactEntryEdit to map to the same object, regardless of the field/caption value, then just remove the WndCaption property from the mapping rule (leaving only property WndClass).

    See http://support.smartbear.com/viewarticle/57331/ for how to do this.



    If the logic is more complex, then you may need to use wildcards and/or other properties.



    Regards,

    Paul