Forum Discussion

dkasirajan's avatar
dkasirajan
Contributor
8 years ago

while recording not using created alias name instead it uses object browser name

I have mapped and created aliases for the objects . but while recording it is not using alias name. It uses complete path name 

from the object hierarchy.

 

earlier it used to work . now i am facing this problem. Is there any property / setting needs to be updated.

Please let me know if any one how to resolve this. 

Thanks,

Devaki

  • ONe item of note right off the top:

     

    It's not a good idea in general to use the "FullName" to identify objects.  It's not really an efficient way of doing things.  

     

    I see you're using the ClrFullClassName which is a good start but then you should find a second property (or third or fourth) in your object that, combined with the class name, would identify the object uniquely.

     

    And that brings us to the root cause of your problem: You're not identifying your objects sufficiently to make sure they are unique.  AmDiagnostics and AmDiagnostics2 are, as you said, the same object so there must be something in the mapping properties that you're using that is not identifying it properly.  This is where I would start... look into the mapping that you set up manually, compare it to what TestComplete is using when it does the recording... I would suggest that TestComplete is probably using a more correct mapping criteria than what you did manually.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I know this is a probably an obvious question but, the only way that I know that this would happen would be is if you mapped the objects on one project and that the project that you did the recording on doesn't actually have a NameMapping section.  Recording should use any mapping that is available.

     

    The other possibility could be that the auto-mapping is turned off and that the objects themselves are variable enough that what you have mapped may not actually match up any more.

     

    Generally speaking, what you've described is non-typical.  So, a couple of things to diagnose:

     

    1) Make sure that your mapping is in the same project as your recordings

    2) Go to Tools | Options | Engines | NameMapping and see if "Map object names automatically" is turned on.  This shouldn't affect recording using existing mapping but it would explain why recording isn't making new mappings

    3) With your application under test open and test complete open, go to the object browser, look for one of your mapped objects and see if "Mapped Name" actually has a value.

     

     

    • dkasirajan's avatar
      dkasirajan
      Contributor

      Thanks for the response.

      I tried and tested with all the option you said. 

      It creates name mapping again while recording, it is not using existing for main process/application. And uses existing  name mapping for pop up window.Please find the attachment. 

      Note:

      1. I have created name mapping from same project and project suite. 

      2. Test Application is opened and checked from object browser- to show object in Name mapping editor. It is pointed correctly. 

      3.I am able to create test steps by adding manually (Selecting Alias mapped name )

       

      This is annoying. please share how to resolve it if anyone had same problem and resolved.

      Thanks,

      Devaki

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        ONe item of note right off the top:

         

        It's not a good idea in general to use the "FullName" to identify objects.  It's not really an efficient way of doing things.  

         

        I see you're using the ClrFullClassName which is a good start but then you should find a second property (or third or fourth) in your object that, combined with the class name, would identify the object uniquely.

         

        And that brings us to the root cause of your problem: You're not identifying your objects sufficiently to make sure they are unique.  AmDiagnostics and AmDiagnostics2 are, as you said, the same object so there must be something in the mapping properties that you're using that is not identifying it properly.  This is where I would start... look into the mapping that you set up manually, compare it to what TestComplete is using when it does the recording... I would suggest that TestComplete is probably using a more correct mapping criteria than what you did manually.