Forum Discussion

jamadarshivani's avatar
jamadarshivani
Occasional Contributor
5 years ago

Different name mapping for same object with same Test complete version and same project

When I first recorded scripts Name mapping was Aliases.Aptify_Shell.AptifyShellForm and now it is Aliases.Aptify_Shell2.AptifyShellForm whereas the project is the same. Aptify_Shell and Aptify_Shell2 is the change that has taken place. Is there any fix for it? 

 

Thank you! 

  • hkim5's avatar
    hkim5
    5 years ago

    that is odd that testcomplete has created two copies of the same object. in which case i dont think that you even need to do conditional name mapping, since you would only use conditional name mapping to account for an object having multiple acceptance criteria for what should be considered as its identification property.

    in which case, you could go ahead and delete one of the two copies, and either go through the trouble of rearranging the children elements within the name mapping tree from aptifyshell2 to aptifyshell1, or start over again by mapping all of the children objects under the same alias.aptify_shell parent.

  • Wamboo's avatar
    Wamboo
    Community Hero

    Hi,

     

    Use conditional mapping mode -> add new values for this object.

    • jamadarshivani's avatar
      jamadarshivani
      Occasional Contributor

      Tried conditional mapping mode but does not work. Please check the image attached below 

       

       

      • Wamboo's avatar
        Wamboo
        Community Hero

        How do you run it in code?

         

        Can You put here some example?

  • what is the difference in terms of the identification properties for Aliases.Aptify_Shell vs Aliases.Aptify_Shell2?

    spot that difference, and use either the conditional name mapping as mentioned above, or regexp to account for the marginal differences between the two aliases. 

      • hkim5's avatar
        hkim5
        Staff

        unless you retroactively edited the identification properties of the two alias objects, there is almost no way that that is possible (if you used the record and replay functionality to automatically map your objects). the difference could be as small as one character or digit, process number, object identifier, or whatever else. Otherwise, Testcomplete could not have created a second "copy" of the same object, since the object under question would already have been mapped and identified under those properties. 

        i have objects that are being incremented at the alias level because of a single backslash being used in identifying the second process as a second object. now i can go ahead and edit the properties to account for the fact that a backslash maybe present in my URL and have that not affect the way things are identified. 

        could you give us the screenshots of what you are seeing for the identification properties of alias.shell1 and shell 2?