Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home Blog navigation QTP Descriptive Programming - How to get number of objects

Welcome to SQAT Blogs!


Aug 10
2009

QTP Descriptive Programming - How to get number of objects

Posted by: Swarup in Testing Tools Blogs

Tagged in: Untagged 

Swarup

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:


Attention! For US visitors deep discounted electronics products available! CLICK HERE to check it out.
Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy