Google News
logo
QTP/UFT - Interview Questions
What do you understand about descriptive programming in the context of UFT? What are the different types of descriptive programming?
Descriptive programming is used to perform operations on an AUT object whose definition isn't recorded in the Object Repository. You can use this approach to skip the Object Repository and provide the Object Description directly in the statement. An object name is merely a way to link a scripted item to its description in a repository. The script should run even if the object name in your script and object repository is changed.
 
Following are the different types of descriptive programming:
 
Static Descriptive Programming : In the Static Method, you specify an object's attribute in the following pattern for object identification.
property:=values,
This format is known as a property value pair, and it is delimited by inverted commas. If your object has many descriptions for identification, use commas to separate them.
 
Dynamic Descriptive Programming : The second way to accomplish the same goal is to use Dynamic Descriptive Programming. It will be highly tedious to specify all the property value pairs for each sentence if your script uses the descriptive programming object candidate several times. In such instances, you might take advantage of QTP's Description Class. A description object's syntax is as follows :
Set MyDescription = Description.Create();
MyDescription("property").Value = "property-value";​
Advertisement