O'Reilly logo

Designing and Implementing Test Automation Frameworks with QTP by Ashish Bhargava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Descriptive programming

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:

  • Static programming: The object's description is directly provided into the script
  • Dynamic programming: The object's description is created using QTP's description object

Static programming

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required