Forum Discussion

Vec84's avatar
Vec84
Contributor
8 years ago

Identifying properties

I have a number of Dynamically loaded side forms which are causing a few issues.   The items on the form change when certain things are selected however the label on the form always remains the sam...
  • tristaanogre's avatar
    8 years ago

    Typically, labels on a form are static objects in their own.  For example, on this page itself, there's a "Subject" field for this message.  That's the data entry field.  The label is the word "Subject" on the line above it.  So, "out of the box" a label is not necessarily an identifying property.

     

     

    This article, however, gives a function that can be used to find an object based upon the object beside it.  This MIGHT work for you.  I haven't tried it, though, so YMMV. https://support.smartbear.com/viewarticle/54646/

     

    Alternative 2: Since the label is a child object of the form, if you map it as a child, you can make it a "required child" in identifying the form. See https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/managing/modifying/required-child-objects.html

     

    Alternative 3: The contents of the form should not change how you identify a form.  So, the fact that the form is changing based upon other selections and that you are losing identification on that form tells me that you are probably using a dynamic property for identifying the form.  This is the grunt work alternative where you will need to spend time going through the properties of the form to find multiple properties.  It probably won't be one or two but a combination of several. I can't give you a "magic bullet" answer to this one... I'm currently doing this myself with my AUT... it takes a bit of time and patience but, eventually, you'll find the right properties.

  • baxatob's avatar
    8 years ago

    Can you show your object tree?

     

    If I understood you correctly, you have the following structure:

     

    yourForm__
              |__Label
              |__Item1
              |__Item2
              |__Item3
    

    Then you can use "Required Children" option for mapping your form.