Introduction to Object Identification in QTP/UFT

Object identification in QTP/UFT (Quick Test Professional/Unified Functional Testing) is a crucial step in automating tests effectively. This process involves the unique identification of the various elements and objects present on the screen of an application. These elements are treated as objects, and their characteristics are captured for recognition during automated tests.

Understanding Object Identification

Object identification in QTP/UFT is a cornerstone of automated testing. It involves capturing the characteristics of elements on the application’s interface, which allows for accurate testing and interaction during the automation process.

Test and Run-Time Objects

During the recording phase, QTP/UFT captures the characteristics of an object and stores them as a Test Object. When the tests are executed, these Test Objects are matched with Run-Time Objects to ensure accurate identification and interaction. This matching process is essential for the automated tests to execute correctly.

Object Identification Methods

QTP/UFT employs a structured method of object identification, which involves four sequential stages. If an object is identified uniquely in any stage, the process terminates. The stages are as follows:

1. Learned Description (Description Properties)

The first stage of object identification involves the use of mandatory and assistive properties to create a unique Learned Description for each object. This is the primary method for identifying objects, and it ensures that the object is recognized based on its essential characteristics. Mandatory properties are core object properties, and assistive properties are used only if mandatory properties are not sufficient for unique identification.

2. Visual Relation Identifiers (VRI)

If the object is not identified in the first stage, QTP/UFT employs Visual Relation Identifiers (VRI) to establish relationships between objects based on their visual layout. This stage is essential for handling situations where objects are dynamically arranged on the screen.

3. Smart Identification

Smart Identification is another stage that leverages the strengths of both Learned Description and VRI. This stage combines the properties and visual relationships to achieve more precise object identification.

4. Ordinal Identifiers

The final stage involves the use of Ordinal Identifiers, which assign numerical values to objects based on their order of appearance. This is particularly useful when objects are not uniquely recognized by their properties or visual relationships.

Object Repository and Properties

Object Repository

The Object Repository holds the information about the identified Test Objects. This information includes the properties of each object, which are crucial for their unique identification during execution.

Mandatory and Assistive Properties

Mandatory properties are the core characteristics of an object, and assistive properties are used if mandatory properties are not sufficient for unique identification. These properties are configured together and used in tandem during object identification.

Example of Object Identification

For instance, when identifying a web button, the property “name” with a value “Login” can form a unique object description. If more properties are needed for differentiation, assistive properties such as “class” or “filename” might be used.

Common Issues and Solutions

Sometimes, objects may not be identified correctly if their properties or visual relationships are not captured accurately. In such cases, understanding the structure of the application and the properties of the objects can help in finding solutions. Resources such as tutorials and videos can provide detailed explanations and examples for resolving these issues.

Conclusion

Object identification in QTP/UFT is a detailed process that ensures the accurate recognition of objects during automated testing. Understanding the various stages and properties involved is crucial for effective test automation. By leveraging the strengths of Learned Description, VRI, Smart Identification, and Ordinal Identifiers, QTP/UFT can adapt to different applications and environments.

FAQs

1. What is the primary focus of object identification in QTP/UFT?

The primary focus of object identification in QTP/UFT is to capture and recognize the unique characteristics of elements on the application’s interface to ensure accurate interaction during automated testing.

2. How does the Learned Description method work in QTP/UFT?

The Learned Description method involves using mandatory and assistive properties to create a unique description for each object, ensuring the object is recognized based on its essential characteristics.

3. What are Visual Relation Identifiers (VRI) and their significance?

Visual Relation Identifiers (VRI) are used to establish relationships between objects based on their visual layout, particularly useful when objects are dynamically arranged on the screen.

4. How can Smart Identification improve object recognition?

Smart Identification combines the properties and visual relationships from both Learned Description and VRI stages to achieve more precise and reliable object identification.

5. When are Ordinal Identifiers used in QTP/UFT?

Ordinal Identifiers are used when objects cannot be uniquely recognized by their properties or visual relationships, assigning numerical values based on their order of appearance for identification.

References

0 CommentsClose Comments

Leave a comment

Newsletter Subscribe

Get the Latest Posts & Articles in Your Email

We Promise Not to Send Spam:)