You might have found the question about descriptive programming a lot of times in the QTP forums. I will try to explain this to you with the following code.
This code uses data driven Automation framework where we also use shared object repositories. Also modifying the same will require me to change its name and could also hamper the smooth execution of previously created scripts.
I use the Object spy to identify the mandatory properties of the objects
dim varCombo ‘Declare the Variable
Set varCombo = Description.Create
varCombo(“window id”).value = “100″ ’setting up the mandatory properties to the above created Variable
varCombo(“nativeclass”).value=”Edit”
varCombo(“location”).value=”10″
I use this code snippet before I use the variable in my script. Its similar to declaring an object before using it(as in any other object oriented language).
Hope this helps.
Cheers!
Related posts:












Blog
very instructive post, thanks!