I’m going to explain and show QTP Descriptive Programming (DP) through Google Sets site:
The goal of the present QTP tutorial is to describe:
How to get number of controls (Links, Edits, Images, etc) with QTP DP.
Let’s investigate Descriptive Programming on examples.
First of all, we should understand what Descriptive Programming means:
What is QuickTest Professional Descriptive Programming (QTP DP)?
Answer: QTP DP is a run-time processing of objects which are not located in QTP Object Repository.
I’ve created new QTP script which starts with http://labs.google.com/sets page.
This QTP script is simple enough:
Set Desc = Description.Create()
Desc(“micClass”).Value = “WebEdit”
Set Links = Browser(“Google Sets”).Page(“Google Sets”).ChildObjects(Desc)
MsgBox “Number of Edits: “ & Links.Count
And its result is:
As you can see, it works correctly and returns correct number of Edits on a page.
I’m going to explain this QTP script and answer the following question: