what is descriptive programming in QTP
descriptive programming is writing qtp scpriting without any object repository
Creating a test without using the object repository is known as descriptive programming since you describe the objects as part of the script.
e.g.
Browser("title:=Google").Page("title:=Google").Link("text:=Advanced Search").Click
Note the :=
in the test objects' names, this is not a smiley it means that the property title
has value Google
(as a regular expression).
You can also use the Description
object via Description.Create
.
You can see more details here.
Descriptive Programming is a way to add objects in the QTP scripting itself instead of adding objects in Object Repository. Below are some useful Descriptive Programming tutorial links:
You can find the complete tutorials here - http://www.onestopsoftwaretesting.com/qtp-descriptive-programming
Descriptive programming is used when you want to perform an operation on an object that is not present in the object repository.
Setting the value of a Text Box
Browser(“Browser”).Page(“Page”).WebEdit(“Name:=textbox_name”,”html tag:=INPUT”).set “My New value”
Read More
Check out this extensive article about the topic
http://mercuryquicktestprofessional.blogspot.com/2006/11/descriptive-programming-simplified.html