Forum Discussion

hrothrock's avatar
hrothrock
Contributor
5 years ago

Using FindChildEx with regexp

I am writing a function to find a child object based on contentText. The items that I have are named similarly, and in my case I have one called "Dispatch 2" and one called "Dispatch 24". If I use te...
  • tristaanogre's avatar
    tristaanogre
    5 years ago

    How's your relationship with the coders?  This is, honestly, what happens when coders write code to just get it done as "elegantly" as possible without considering things further down the pipeline.  They, many times, don't think about what some of their "dynamic" object creation does to automation efforts.

     

    See if they can add an attribute to the objects that is a unique identifier.  You can then use that attribute as the property for your search.

     

    On those lines, that's something else you can look into.  There are properties of onscreen objects that are, themselves, objects with additional properties.  css, attributes, etc., are all accessible via TestComplete and can be utilized for object identification.