Forum Discussion

hogueybear's avatar
hogueybear
Occasional Contributor
10 years ago

Aliases and name mapping

When I Record Script and click on my application it is referenced as

    Aliases.java.frame0

 

But when I rerun the test is can not find, Aliases.java.frame0

 

Using object spy I see my application is actually named

   Sys.Process("java", 2).SwingObject("JFrame", "zServer 7.0", 0)

 

If I take my automated script and replace Aliases... with Sys... all the other references are borken.

 

I looked into object mapping, but I have been unable to map the Sys... into the Aliases.  I keep gettting errors that say the heirarchy doesn't match.

 

Is there a simply way to either tell tc not to use frame0 or to get the mapping correct?

3 Replies

  • hogueybear's avatar
    hogueybear
    Occasional Contributor

    Looks like I figured it out.

     

    If I went into the object browser and right clicked on the 2 java processes and selected map object I got the results seen below:

     

    Process("java")
    The object Sys.Process("java") is already mapped to NameMapping.Sys.java

    Process("java", 2)
    The object Sys.Process("java", 2) is already mapped to NameMapping.Sys.java

     

    Which is clearly a conflict as "java" is my server and "java", 2 is the client I am trying to test.

     

    So I deleted all the "java" apps from the mapped objects in the name mapping panel and then mapped the one I wanted from the object browser and took the time to rename the map to be java.Frame0 and I have the simple tests running.

    • mes6073's avatar
      mes6073
      Contributor

      When you have multiple instances of similar objects that are differientiated by object index, then you will need to use more static object properties such as ClrClassName, ClrFullClassName, or even ClrParent.Parent.Name in the case of DotNet type frameworks in order to make each mapped object unique

  • NisHera's avatar
    NisHera
    Valued Contributor

    Hi,

    When I started with name mapping it took me some time to get hold of the concept.

    Better read this  link  and do some simple recordings and paly back, observe how those objects are mapped.

     

    There could be many reasons to not to identify such as at the play back time object not created, mapping corruped or changed some or other reseson....ect.

     

    If you like to handle objects as it is without mapping, turnoff automapping before recording as mentioned in this