Descriptive Programming is a way to add objects in the QTP scripting itself instead of adding objects in Object Repository. Below are some useful Descriptive Programming tutorial links:
Source | Tutorial Link |
SoftwareTestingTimes.com | Descriptive Programming in QTP |
SoftwareTestingTimes.com | QTP Descriptive Programming – How to get number of Objects |
AdvancedQtp.com | Descriptive Programming in 60 slides |
SoftwareTestingTimes.com | QTP: Object Repository, Descriptive Programming and Beyond |
KnowledgeInbox.com | Descriptive Programming tuts by Tarun Lalwani (ranks no. 1) |
There are two ways in which descriptive programming can be used
By creating properties collection object for the description.
By giving the description in form of the string arguments.
By creating properties collection object for the description.
To use this method you need first to create an empty description
Dim obj_Desc ‘Not necessary to declare
Set obj_Desc = Description.Create
Now we have a blank description in “obj_Desc”. Each description has 3 properties “Name”, “Value” and “Regular Expression”.
obj_Desc(“html tag”).value= “INPUT”