UFT/QTP – Automation Object Model

An object model is a collection of classes or objects which can controlled by any program. An object model gives a facility to control the functionality of an application programmatically.

The UFT Automation Object Model (AOM) is a set of its classes and interfaces together with their properties, methods and events and their relationships.

Using AOM the functionalities of UFT can be controlled from any other applications/programs by using a scripting or programming language. Read More

UFT/QTP – HTML DOM

The Document Object Model (DOM) is an application progamming interface (API) developed by the World Wide Web Consortium (W3C) to create and modify HTML pages and XML documents. The document object model can be used with any programming or scripting languages.

HTML DOM – A Standard object model for HTML documents

XML DOM – A Standard object model for XML documents Read More

UFT/QTP – Windows and Web Objects

Objects supported by UFT can be divided in to 3 categories. Technology Objects, Utility Objects and Supplemental Objects.

Technology Objects

These objects represent the test objects of various technologies like Web, Window, Java and Visual Basic. For example WebEdit, WebList and WebButton belong to Web technology. Test objects WinEdit, WinButton and WinList belong to windows technology. Read More

UFT/QTP – Working with Data Table & Excel Object Model

Working with Data Table Object

To work with data present in the Data Table UFT supports three objects name Datatable Object, DTParameter Object and DTSheet Object. These objects support various methods and properties to interact with data in the data table.

Data Table Object

Read More

UFT/QTP – Descriptive Programming

When UFT learns an object in application, it adds the appropriate test objects to the object repository along with some description on how to identify that object. UFT cannot take action on an object until it is in the object repository.

Descriptive programming (DP) is used when we want to perform an operation on an object that is not present in the object repository. There are many obvious reasons why an object cannot be in the repository and also why we should use descriptive programming like –

  • When objects in the application are very dynamic.
  • When the Object Repository’s size is big, it results in poor Performance as the size of the Object Repository increases.
  • When the framework is built such that it has been decided not to use Object Repository at all.
  • When testers want to perform an action on the application at run-time without having the knowledge of object’s unique properties.

Read More

UFT/QTP – Regular Expression

A regular expression (also known as regexp and regex) is a text that consists of patterns of characters for describing a search pattern.

Regular Expression Characters

Read More

UFT/QTP – Recovery Scenario

Recovery Scenario is used to instruct UFT to recover from unexpected events and errors that occur in your testing environment during a run session.

Recovery scenarios are saved in recovery scenario files. A recovery scenario file is a logical collection of recovery scenarios, grouped according to your own specific requirements.

 

key Elements of Recovery Scenario

Below are the key elements that are part of a Recovery Scenario:

  • Trigger Event: The event that interrupts your run session. For Example – a pop up window or a UFT run error
  • Recovery Operations: The operations to perform to enable UFT to continue running the test after the trigger event interrupts the run session. For Example – Clicking the ok button in pop up window or restarting Microsoft Windows.
  • Post- Recovery Test Run Option: The instructions on how UFT should proceed after the recovery operations have been performed and from which point in the test UFT should continue. For Example – you may want to restart a test from the beginning or skip a step entirely and continue with the next step in test.

Read More

UFT/QTP – Error Handling

There are several ways to handling errors in QTP. There are three possible kinds of error type one would encounter while working with QTP.

  • Syntax Errors
  • Logical Errors
  • Run Time Errors

Syntax Errors

Read More

UFT/QTP – Debugging

Debugging is the process of locating and fixing errors in the program code. After you create a test, you should check that it runs smoothly, without error syntax or logic. Set the breakpoints in the program to stop program execution and to isolate defects.

There are various ways to perform debugging using break points in QTP. Break Points can be inserted just by pressing “F9” or by using the Menu option “Run” → “Inserting/Removing Break Point”.

After Inserting the Break point the “Red Colored” Dot and the line will be highlighted in RED as shown below:

How to Debug?

Step 1 –  Add/Delete Breakpoint Read More

UFT/QTP – VBScript Tutorial Solved Examples

Find whether the given number is an odd or even number
Dim n
n= inputbox(“enter the number”)
n =cint(n)
if (n mod 2 = 0) Then
print(n & “is even number”)
else
print(n & “is odd number”)
End If Read More