Using the Description object

The Description object is one of UFT's reserved objects, like the Environment and Reporter object. Basically, the Description object resembles a dictionary object with key-value pairs, which defines the properties and values by which the target TO or objects (see the Using child objects recipe), should be identified. Similar to the OR feature, the Description object also allows for regular expressions as property values. The following table shows regular expression samples of character property values:

User

To match character

\w

This represents a word character

\W

This represents a nonword character

\d

This represents a decimal digit

\D

This represents a nondecimal digit

\s

This represents a whitespace ...

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.