What is the descrirptive progrmaing?.what is the use of descriptive programing?

Questions by gangasrinivas

Showing Answers 1 - 10 of 10 Answers

Sumant

  • Oct 19th, 2005
 

QTP uses it's object repository to refer to objects present in your test and which have been recorded, if you wish to use objects that were not recorded and are not present in your object repository then we use descriptive programming, where QTP does not refer to object repository but the property name and value are mentioned in the code itself for QTP to use it for e.g

this is not Desc. prog.

Browser("Mercury Tours").Page("Mercury Tours").WebEdit("username")

This is desc prog.

Browser("Title:=Mercury Tours").Page("Title:=Mercury Tours").WebEdit("Name:=Author", "Index:=3").Set "Mark Twain"

where we mention the Property name "Title" and it's value "Mercury Tours" in the code itself.

Hope it will help

Sumant

 

  Was this answer useful?  Yes

Sumant

  • Oct 19th, 2005
 

QTP uses it's object repository to refer to objects present in your test and which have been recorded, if you wish to use objects that were not recorded and are not present in your object repository then we use descriptive programming, where QTP does not refer to object repository but the property name and value are mentioned in the code itself for QTP to use it for e.g

this is not Desc. prog.

Browser("Mercury Tours").Page("Mercury Tours").WebEdit("username")

This is desc prog.

Browser("Title:=Mercury Tours").Page("Title:=Mercury Tours").WebEdit("Name:=Author", "Index:=3").Set "Mark Twain"

where we mention the Property name "Title" and it's value "Mercury Tours" in the code itself.

Hope it will help

Sumant

 

  Was this answer useful?  Yes

palani

  • Oct 21st, 2005
 

what is the descrirptive progrmaing?.what is the use of descriptive programing?
Answer:

  Was this answer useful?  Yes

Subha

  • Nov 16th, 2005
 

Descriptive programming is used to identify the objects that are not/cannot be stored in the object repository.  Descriptive programming can be implemented by creating and using a Description object.

  Was this answer useful?  Yes

anandhan navaneethan

  • Nov 25th, 2005
 

Descriptive Programming is the way of writing the test scripts without recording the actions. This method allows to create the object at the run time. This does not make use of the GUI repository. Dynamically the object get created and destroyed at the end of the run.

divyag

  • Jan 9th, 2011
 

We can use descriptive Programming to recognize similar type of objects
In this Program the properties are specifed in the script, as the properties are specifed in the script no need to have objects in the repository.
Syntax
Browser("Br Name:").Page("Pg Name:").WebObject("Property:=value","Property:=value").method
Eg:
Browser("Creation time:=0:").Page("micclass:=Page").WebEdit("name:=login").Set "abcd"

  Was this answer useful?  Yes

Descriptive programming is used when we do not want to use OR for identifying test objects. However the object identification mechanism remains same whether we use OR or do not use OR(in case of DP). In DP also we provide a property for test object which will help in uniquely identifying object in the application.

Syntax of DP: Browser(title:="Google NCO").Page(name:="example 1").Link(htmlid:="example2")

Use: Descriptive programming is used when we need to create scripts when the test application is not available with us for reference, but we have enough input to create scripts.
Another use is, sometimes we need to develop common code which will be used by different applications/web pages, and by using OR we will restrict the use of this script.

  Was this answer useful?  Yes

Rakesh Ga

  • Jul 9th, 2011
 

A mechanism which bypasses the object repository and identify the object uniquely by the properties specified directly.

There are 2 types
1)Static 
2)Dynamic

  Was this answer useful?  Yes

QTP recognises every thing in the form of objects,when we use recording option it automatically identify the objects.but actually we don't record the scripts because of so many disadvantages like re usability etc.
so we use descriptive programing.
it is of two types1).static,2)dynamic
in static  by creating object repositories or by using object spy or by creating function libraries we do the programing.
in dynamic ,along with the above we create description objects an associate the corresponding programing.

  Was this answer useful?  Yes

nadir

  • Jul 15th, 2011
 

Descriptive programming is majorly used to write descriptive code. I would be helpful to identified an accurate object properties because in some of the scenarios the object name is similar like webchecbox, winedit, Webtable etc. so descriptive programming help to reduce the risk of invalid properties.
Also to execute our scripts faster we call this descriptive programming.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions