Novari-QA's avatar
Frequent Contributor
7 years ago
New Idea

Implement Dynamic variable construction on Name Mapping Screen.

In our project we have multiple ids in a single panel, lets say 5 objects. 

Object 1
Object 1 a
object 1 b
obj 1 c
obj 1

As you can see these object IDs all have something different about them, but one thing stays consistant. The user in our application can click a button to create a new panel making 5 more objects.
Object 2
Object 2 a
object 2 b
obj 2 c
obj 2

One thing stays consistant, the number. I want the ability to create a single variable called "ObjectNum" and be able to inject that variable in the name mapping value screen. for example
"Object " + ObjectNum
"Object " + ObjectNum + " a"
"object " + ObjectNum + " b"
"obj" + ObjectNum + " c"
"obj " + ObjectNum

Currently this feature does not exsist, so i have to create 5 object variables.

I would rather create 1 variable than 5. In my actual job, these objects are not limited to 5 but rather 20 - 30


  • cunderw's avatar
    Community Hero

    Could you not map them with something like a class name which is static and then just change the index via variable? Or set the id for their parent only?

  • Novari-QA's avatar
    Frequent Contributor

    Im sorry i don't follow to what you are referring to?

  • cunderw's avatar
    Community Hero

    Are the other ways you could map your objects without the need for individual variables is what I was saying. Perhaps they share a common property and on that changes such as the class name of the object and it's index. Or does the parent panel have something you could parametize? 

  • tristaanogre's avatar
    Esteemed Contributor

    OR... since you know that the items within the panel maybe dynamic... don't map them at all.  Map up to the panel containing the objects and then use "FindChild" methods to find the specific child objects based upon a set of criteria that will be able to discover the objects.  This is a standard practice in our "house" where if we know, from test run to test run, objects are dynamically generated (like rows in a table), then we don't map the rows, we just map the table and then interact with the rows dynamically.  This hybrid method is actually something that a lot of people do.

  • cunderw's avatar
    Community Hero

    100% agree with tristaanogre on his suggestion. Personally I use a very very minimal name mapping, just to drill down into the areas that are more static, panels, tables etc.. Individual object identification is mostly done by finding children of the parent objects.