0% found this document useful (0 votes)
62 views

Confidential. Strictly For Internal Circulation Only

This document discusses descriptive programming, which is a method of performing operations on objects that are not in the object repository. It can be used when dealing with dynamic objects, large numbers of objects, objects added at runtime, or similar objects with the same name. The advantages include being version free, allowing code portability, reusing object properties, and only requiring variable maintenance. Descriptive programming can be static, directly listing properties in a statement, or dynamic by adding properties to a description object.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Confidential. Strictly For Internal Circulation Only

This document discusses descriptive programming, which is a method of performing operations on objects that are not in the object repository. It can be used when dealing with dynamic objects, large numbers of objects, objects added at runtime, or similar objects with the same name. The advantages include being version free, allowing code portability, reusing object properties, and only requiring variable maintenance. Descriptive programming can be static, directly listing properties in a statement, or dynamic by adding properties to a description object.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 8

Confidential. Strictly for internal circulation only.

Day 9
2

Descriptive Programming
Descriptive Programming
3
Descriptive Programming is a method of performing operation on
the object which is not there in Object Repository. In this process
object properties will be used in script.
When to use Descriptive Programming
4
1. If the application is having Dynamic Objects
OR:- Difficult to handle Dynamic Objects using Object Repository

2. When we have more objects to perform operations
OR:- The performance will decrease if object repository is having huge number of
objects.

3. If the application is having objects that are adding in the Run Time
OR:- We cant add objects to Object Repository in run time.

4. If we need to start Automation before Build Release
OR:- There is no application to create Object Repository.

5. If Application is having similar type of objects or similar name objects
OR:- Object Repository will create multiple objects with same description
unnecessarily.

6. Big Team Size
OR:- Shared Object Repository is not changeable by multiple persons at a time.
Maintenance becomes harder if all the team members have created their own
object repositories.
Advantages of Descriptive Programming
5
1. Version Free
DP:- Script can be executed in any version of QTP without any changes.

2. Code Portability
DP:- Just code is enough run script. We can copy and paste in other
scripts for any other required requirement.

3. Reusing of Properties
DP:- We can assign properties to a global variable and reuse it for same
type of objects.

4. Plug & Play
DP:- Any time scripts will be in ready to run state. No need to worry
about any other settings or files.

5. Just Maintenance of variables
DP:- We can store the object properties in the form of variables in a txt /
vbs file which will be placed in central location. In this case we just need
to maintain that file.
Types in Descriptive Programming
6
Static
You list the set of properties and values that describe the object directly in a VBScript
statement.
Browser("micclass:=Browser").Page("micclass:=page").Link("name:=Login").Click

Dynamic
You add a collection of properties and values to a Description object, and then enter
the Description object name in the statement.

Set oBrowser = Description.create
oBrowser (micclass).value=Browser
oBrowser (name).value= Google

Set oPage = Description.create
oPage (micclass).value=Page
oPage (name).value= Google
Set oLink = Description.create

oLink (name).value= Login
oLink (index).value= 1

Browser(oBrowser).Page(oPage).Link(oLink).click
7
8
SemanticSpace Technologies
100 Pacifica Suite 270,
Irvine CA 92618,
Tel: (949) 789-7332
Fax: (949) 789-7334
www.semanticspace.com
Prolifics
22 Cortlandt Street, 18th Floor,
New York, NY 10007
Tel: (212) 267-7722
Fax: (212) 608-6753
www.prolifics.com
Arsin Corporation
Suite 425, 4800 Great America Parkway,
Santa Clara, CA 95054 -1228
Tel: (408) 653-2020
Fax: (408) 653-2030
www.arsin.com
Corporate Headquarters
European Offices
London, UK Hamburg, Germany
Philadelphia, PA San Francisco, CA Irving, TX Atlanta, GA Orlando, FL Cleveland, OH
US Offices
Boston, MA
India Office
Plot #226, Road #17
Jubilee Hills, Hyderabad-500033
Phone: +91 40 39991999
Fax: +91 40 23114651

You might also like