Below
are some of the examples when Descriptive Programming is considered a good
alternative to using a traditional Object Repository to define a test object:
1.
When
the objects in the application are dynamic in nature and need special handling
to identify them at runtime.
Ex: Clicking a object which changes according
to the user navigation of the application
2.
When
Object Repository is getting very large. If the size of Object Repository
increases too much then it decreases the performance of QTP during runtime.
3.
When
we don’t want to use an Object Repository at all.
4.
When
modification to an OR object is required but the Object Repository in which the
object resides in either Read Only or it is located in a shared OR and the
changes may affect other scripts outside of our control.
5.
When
we want to take action on large number of similar/uniform objects, for example
we have 30 textboxes on a page and their names are in form of txt_1, txt_2
through txt_30. In this situation adding 30 entries to the Object Repository
would not be a good programming approach, but using dynamically defined DP
statements would be.
Contributed by: Vamshi Gowtham
m.vamsigowtham@gmail.com
m.vamsigowtham@gmail.com