Descriptive programming is used in many scenarios, such as when QTP can not identify objects from property values stored in the object repository. -> Users do not want to use the object repository or do not want to bypass. -> I want to write code that users can run on multiple websites. For example, if you print the name of all links on Google or yahoo, you can use public property values with the same code.
We use static descriptive programming in two ways, but here we use properties and values to directly access the objects in the test script. For example. Browser ("micClass: = ... ...") page ("micClass: = ..."). Link ("micClass: = ...")
Note: While descriptive programming can be started at any time, once started, the Object Repository can not be used until the row is complete.
Dynamic description programming Here we create and manipulate descriptive objects. For example. Set objTest = Description. Create objTest ("micClass"). Value = "Link" objTest ("name"). Value = "Click here"
QTP evaluates all attribute values of descriptive programming as regular expressions. Therefore, if you want to enter a value containing special regular expression characters (*,?, +, Etc.), use the \ (backslash) character to indicate that QTP treats special characters as literal characters. Somehow, there is a myth of the QTP community that DP can be used when QTP can not identify objects using traditional methods. Descriptive programming provides a way to bypass the object repository and provides some flexibility in identifying objects. However, even after adding the appropriate add-on, you can not identify the object in the usual way. Do not think that DP will be useful.
Descriptive programming is used in many scenarios, such as when QTP can not identify objects from property values stored in the object repository. -> Users do not want to use the object repository or do not want to bypass. -> I want to write code that users can run on multiple websites. For example, if you print the name of all links on Google or yahoo, you can use public property values with the same code.
When descriptive programming is used from a specific location in the test object hierarchy, descriptive programming must be continued with the same sentence. If you describe other objects in the hierarchy using descriptive programming and specify the test object with that object store name, QTP will not recognize that object. QTP evaluates all attribute values of descriptive programming as regular expressions. Therefore, if you want to enter a value containing special regular expression characters (*,?, +, Etc.), use the \ (backslash) character to indicate that QTP treats special characters as literal characters.