qtp session day9
DESCRIPTION
QTP Session Day9TRANSCRIPT
![Page 1: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/1.jpg)
Confidential. Strictly for internal circulation only.Confidential. Strictly for internal circulation only.
![Page 2: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/2.jpg)
Day 9
2
Descriptive Programming
![Page 3: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/3.jpg)
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.
![Page 4: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/4.jpg)
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 can’t 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.
![Page 5: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/5.jpg)
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.
![Page 6: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/6.jpg)
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.createoBrowser (“micclass”).value=”Browser”oBrowser (“name”).value= “Google”
Set oPage = Description.createoPage (“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
![Page 7: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/7.jpg)
7
![Page 8: QTP Session Day9](https://reader036.vdocument.in/reader036/viewer/2022082821/55cf9709550346d0338f66ac/html5/thumbnails/8.jpg)
8
SemanticSpace Technologies100 Pacifica Suite 270,
Irvine CA 92618,
Tel: (949) 789-7332
Fax: (949) 789-7334www.semanticspace.com
SemanticSpace Technologies100 Pacifica Suite 270,
Irvine CA 92618,
Tel: (949) 789-7332
Fax: (949) 789-7334www.semanticspace.com
Prolifics22 Cortlandt Street, 18th Floor,
New York, NY 10007
Tel: (212) 267-7722
Fax: (212) 608-6753
www.prolifics.com
Prolifics22 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
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 HeadquartersCorporate Headquarters
European OfficesEuropean Offices
London, UKLondon, UK Hamburg, GermanyHamburg, Germany
Philadelphia, PAPhiladelphia, PA San Francisco, CA San Francisco, CA Irving, TX Irving, TX Atlanta, GAAtlanta, GA Orlando, FL Orlando, FL Cleveland, OH Cleveland, OH
US OfficesUS Offices
Boston, MA Boston, MA
India Office
Plot #226, Road #17
Jubilee Hills, Hyderabad-500033
Phone: +91 40 39991999
Fax: +91 40 23114651
India Office
Plot #226, Road #17
Jubilee Hills, Hyderabad-500033
Phone: +91 40 39991999
Fax: +91 40 23114651