Forum Discussion
Hi Tristaanogre,
thanks, Actually for some components the mapping is too long and some of the elements have the same mapping and at the end of the objects are different so I thought of recurssion.
thanks and regards
SivaKartheek Sreeram
Hi,
The beauty of Aliases is that their tree can be reorganized to be less deep and more convenient for use. This is described here: https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/about.html#aliases-and-mapped-objects. Have you considered this option? Does it fit your needs?
- tristaanogre6 years agoEsteemed Contributor
What AlexKaras said... that's the whole point of Aliases... you MAP the whole thing, but then you use the Aliases to "telescope" the objects down to what is strictly necessary for your code.
- sivakarthik6 years agoContributor
Dear tristaanogre,
I have understood the concept of Aliasse but acutally what I am trying to do is,
In each bar item, there is a grid and I would like to test in that grid.
the grid mapping examples like this:
Aliases.process().VCLObject(txt1).VCLObject(text2).VCLObject(text3)...VCLObj(text4).VCLObject(text5)
Aliases.Process().VCLObject(txt1).VCLObject(text2).VCLObject(text10)...VCLObj(text4).VCLObject(text5)
Aliases.Process().VCLObject(txt1).VCLObject(text2).VCLObject(text10)...VCLObj(tex16).VCLObject(text5)
so I would like iterate till the cond if cond satisfy take the text 10 like that
I would like to
did you get my point now ?
thanks and Regards
SivaKartheek sreeram
- tristaanogre6 years agoEsteemed Contributor
Again, to be clear... you haven't mapped ANYTHING. Terminology matters. :-)
So... what I would suggest... map everything up to a point where there is a common parent. Then use the "FindAllChildren" method on that parent to search for and return a collection of all the desired child objects. That is usually returned as an array. You can then do a for loop through that array and process each item individually.
Related Content
- 3 years agoIuliaVascan
- 3 years agoReact
Recent Discussions
- 16 hours agovladd1