What is descriptive programming in QTP?
相关问题
- move from QTP to selenium , can anyone help me to
- UFT 12.01 “.click” and “FireEvent” doesn't wor
- UFT-API: How to write the output of a select data
- How to reference the mail which triggered the outl
- RPA Vs Traditional Automation Tools
相关文章
- How to reference the mail which triggered the outl
- RPA Vs Traditional Automation Tools
- QTP vs Selenium - Compare [closed]
- Calling C# dll in vbscript
- QTP/UFT - Close all browsers except QC/ALM
- Insert node in xml document using c#
- How does UFT perform the Click method when using t
- Can I invoke QTP test suits automatically from Mav
In Simple words we can say Describing the object via Code, Instead of Object repository.
Sample Code
Object Based Code
And you Need object for all
Descriptive Programming is used to perform operations on the object which we are not present in qtp.It uses [Property ->value]. Please refer below link:-
Descriptive Programming Simplified
Using Descriptive programming we can define an objects in the QTP without using the OR (object repository) Here is a good tutorial that describes three ways to do descriptive programming: http://www.bytetips.com/descriptive-programming-in-qtp/
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.
Note the
:=
in the test objects' names, this is not a smiley it means that the propertytitle
has valueGoogle
(as a regular expression).You can also use the
Description
object viaDescription.Create
.You can see more details here.
Identifying the objects in your page without Object Repository with special property The most used for Descriptive objects when you have more than one object in the same page with same E.g. HTML ID and you need to click on all of it ... you can return all objects and making loop to click on the object that you identify in object script with it's property(s)
Think of it as finding a location (like finding the object), object repository works as a map app (e.g., Google map), you just have to give the recorded location and it will find it for you.
Descriptive programming is basically you understand the object and its elements. It means you know way to go home or at least have a map with you in order to find the location.
Both have pros and cons. Say if your phone is dead, or there's no network, Google maps (object repository) won't work for you anymore. You have to go with a native way.