Forum Discussion

kcsahu777's avatar
kcsahu777
Contributor
13 years ago

findchild call

Assume, we would use only findchild method for a web page.

Is it like every time the page is loaded we need to get the objects using findchild method?



Suppose we have already got the reference of one object from the page, and then if we close and re-open the same page, do we need to call the findchild method again to get the same object's reference?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Short answer: yes.



    The reason being is that, while the objects themselves aren't really changing, the "handles" to those objects have changed and so any "destruction" of them requires you to refined them.



    This is one reason why NameMapping is so potent in that it handles that for you behind the scenes.  And, using aliases, you can "telescope" your objects down to something more manageable when it comes to defining the hierarchy of objects.