How To Use Descriptive Programming in QTP

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:

  1. Secure PHP Programming!
  2. Generators in Python….
  3. Programming Language Concepts
  4. How To Use ABAP Programming Tricks
  5. Top 45 Ping Service

Tags: , , , , ,

One Response to “How To Use Descriptive Programming in QTP”

  1. Julian 06. Feb, 2009 at 10:06 pm #

    very instructive post, thanks!

Leave a Reply

Canonical URL by SEO No Duplicate WordPress Plugin