Descriptive programming is used when we want to perform an operation on an object& nbsp;that is not stored in the object repository. This way QTP wont search for the object properties in the Object Repository, but will take it from the DP(< span style="mso-spacerun:'yes'; font-weight:bold; text-decoration:underline ;font-size:11.0000pt; font-family:'Calibri'; ">descriptive programming) statement.
DP can be written in two ways..
1. Static (by provide the set of properties and values directly)
2. Dynamic (by creating description object)
Let us write an inline descriptive programming statement for username box of demo flight reservation application.
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "mercury"
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!