Forum Discussion

anitha_lakshmi1's avatar
anitha_lakshmi1
Contributor
7 years ago

How to map objects during run time?

The application I am automating will be coming with new features every 15 days. If I go with Name mapping, it may change evenly. I just want to map variables during tun time thru scripting.how can I handle this issues, What is the best approach for this. Please guide me.

5 Replies

  • Thanks for the inputs, but can I get anyway to map objects of application using this findchild or findchildren to one excel and use them.

    Using the process name can I get all values of controls in one excel or xml format,

  • SanderK's avatar
    SanderK
    Occasional Contributor

    So basically you want to map your application? Why not just use the namemapping then? I imagine that if your application changes to such extent as you describe that you'd have to constantly modify your test scripts anyway. It's probably not that much of an additional effort to update your name mapping as well.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      There are any number of "tricks" in NameMapping to help account for dynamically changing applications.  There's Extended Find which allows you to "compress" the hierarchal tree of objects so that you don't have to have ever ancestor object mapped to identify an object.  You can wild-card property values to account for slight differences in name changes.  You can use the Conditional Mapping to use if/and/or logic for properties to make them more accountable.

       

      As mentioned, the objects need to be identified in order for TestComplete to find them.  If they are changing THAT drastically every 15 days that even using FindChild is not useful (since property values may change that frequently), your best bet is to go to your development team and request that they begin a practice of adding some static identifier property to critical UI objects so that you can maintain a stable automation project.