Forum Discussion

Viji123's avatar
Viji123
Occasional Contributor
9 years ago

Issue in name mapping

I am using  Object Spy to find items in an option which is similar to dropdown as shown below. If I click on the tiny arrow near the ? icon (refer below picture) , it will expand and show the options like "Create page", "Create group" etc.  Once I unfocus it will collapse. Now am trying to map an item from the available options (for ex : Create Group).But the object spy is not able to map it. So I tried using Point and fix (Shift+ctrl+A) from the Object spy, its able to get the properties of the item but not able to map the same in the object tree. 

 

14 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    The same SHIFT-CTRL-A capability works with the NameMapping tool as well.  There should be a button in your tool bar right next to Object Spy that is the manual mapping tool.  Try using that.

    • Viji123's avatar
      Viji123
      Occasional Contributor

      I just tried the one that you have mentioned. No luck. Its not able to map the item

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Probably what you'll need to do then is what we needed to do in a similar situation.  NameMapping can be done "automatically" when you record. So, in situations when manually mapping is not working well (as soon as it loses focus, the object "goes away" and can't be mapped), what I do is just do a quick little record of JUST the action that I want.  This maps the components I need for me which I can then go back in and edit to my particular needs.

  • Vec84's avatar
    Vec84
    Contributor
    You could also attempt to map it from the object browser within Testcomplete - from there you can locate hidden items too
  • The better approach to handle these scenarios is by descriptive programming.

     

    Also, per your requirement when you want to see all the properties related to any invisible object you need to enable the option "Show Invisible Objects". This can point out to the hierarchy on the object browser. 

     

    After this, you can map the object to NameMapping.

     

    If this does not work, better have the descriptive approach to identify the elements in runtime.

     

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      I think a good way to use TestComplete is to mix NameMapping with descriptive programming.  There are some aspects of many applications that don't hold to static mapping so there are some points where using "Find" functions and such may work better.  But I think, when used properly, NameMapping can work very well, even in more modern applications.  Using wildcards for certain dynamic property values, using conditional mapping, using required child objects, etc., all part of the TestComplete environment that you can leverage for your use.

       

      In this particular situation, I think mapping is still possible... we had a situation similar where only when an item had focus did it actually show on screen.... and just a quick recording against the component did the trick.  

    • Viji123's avatar
      Viji123
      Occasional Contributor

      RajeshVV

      Can you pls let me know where I can find the "Show Invisible Objects"

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    hi Viji,

     

    it might be useless but did you tried to record a keyword test, and convert it into script while beeing sure that you have all the debug infos available ?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        So, recording the actions to click on those Create Page, etc., links didn't map anything?  What did you get when you tried?