QTP identifies an object by its properties that are stored in the OR. When the object description is created in the test script, the approach is called descriptive programming. In this method of script creation, objects are not stored in the OR.
Descriptive programming can be achieved in two ways:
Examples of static descriptive programming are shown as follows:
'Add object description as property value pair Dialog("regexpwndclass:=Login").Activate Dialog("regexpwndclass:=Login").WinEdit("regexpwndclass:=Edit","attached text:=AgentName").Set "ashish" Dialog("regexpwndclass:=Login").WinEdit("regexpwndclass:=Edit","attached text:=AgentPassword").Set "mercury" Dialog("regexpwndclass:=Login").WinButton("regexpwndtitle:=OK").Click 'The multiple property and value pair is provided in the object...