Need help to automate with Test Complete
- 10 years ago
I use a combination.
I map high level objects (pages, tabs, larger areas - such as main panels - within pages/tabs, some tables).
Using those as a starting point I use things like FindChild, FindAllChildren and helper functions (where the logic to find things is more complex than the find methods allow for).
I've used this analogy before, but think of it as a book.
If you are looking for a single word in a book, starting at page 1 and looking through EVERY chapter/page/paragraph in a book sequentially will be slow.
However, if you know what chapter the word is in, you start looking there. If you know what page within the chapter, you would start there. If you know which paragraph on the page, start there. Etc. Each level down cuts the search and so speeds it up.
Also, higher level objects tend to change less frequently, and give you less to maintain. You *can* map all objects, if you want, in with certain types of applications/languages, I find it easier/essential to map lower level controls as they don't contain enough information on their own to be found dynamically at run time. By this will vary depending what you're testing. For web stuff, I use the above approach of map high level, find low level.