Forum Discussion

waqas_aslam118's avatar
waqas_aslam118
New Contributor
12 years ago

NameMapping aliases Tree Hierarchy Changed.

I am working on Desktop application which is in Developer Express WPF.



Problem:

We are working on different machines for one Application. But at one point we are stucked, which is When we make one test case in machine # 1and for this multiple Aliases being created in NameMapping like



wndTableRenderDemo.RootPane.null_layeredPane.TableRenderDemo.ScrollPane.Viewport.TableHeader

wndTableRenderDemo.RootPane.null_layeredPane.TableRenderDemo.ScrollPane.Viewport.TableColumn



But when on machine # 2 when i execute this test case, it giving me an error message stated "Object Does not exists."



Aliases are exists in NameMapping, but when we update the screen shot of above objects it show the below path





wndTableRenderDemo.RootPane.null_layeredPane.TableRenderDemo.ScrollPane.Viewport2.TableHeader

wndTableRenderDemo.RootPane.null_layeredPane.TableRenderDemo.ScrollPane.Viewport2.TableColumn





aliases get changed w.r.t machine # 2. We need to reowork or need to modify the testcases w.r.t updated hierarchy.



How we can resolve this issue?

3 Replies

  • Hi Aslam,

    The object in namemapping is stored with lot of properties, which might also contain few properties that will not match the same object at another instance or same object in different platforms/machines.



    It is always recommended we obtain such dynamic objects at runtime rather than the static properties from namemapping.

    And yes wild card would also help.



    Thank you,

    Ashok



  • Thanks for the Help.



    But problem is it creates the Name dynamically, we cant seet the name, thats why we cant implement regex with this.



    << It is always recommended we obtain such dynamic objects at runtime rather than the static properties from namemapping. >>



    How we can get the objects at run time?



    One more thing, we will cover this in future, but what we need to do the already create tests? rework or some other appraoch?