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 – 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.

QTP Recovery Manager

 

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 – 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:
QTP BreakPoint Script

How to Debug?

Step 1 –  Add/Delete Breakpoint Read More

UFT/QTP – VBScript Tutorial Part -3

Array

A VBScript array is a special type of variable that allows you to store multiple values against a single variable.

Features of Arrays

  • Array in VBScript are Zero-Based.
  • Arrays in VBScript can have a maximum of 60 dimensions.
  • If no value is assigned for an array element it consists of Null value by default.
  • Arrays can not only hold similar kind of data but can have combinations of type of data.

Read More

UFT/QTP – VBScript Tutorial Part -2

Operators

VBScript has a full range of operators, including arithmetic operators, comparison operators, concatenation operators, logical operators.

Operator Precedence
When several operations occur in an expression, each part is evaluated and resolved in a predetermined order called operator precedence. You can use parentheses to override the order of precedence and force some parts of an expression to be evaluated before others. Operations within parentheses are always performed before those outside. Within parentheses, however, standard operator precedence is maintained.
When expressions contain operators from more than one category, arithmetic operators are evaluated first, comparison operators are evaluated next, and logical operators are evaluated last. Comparison operators all have equal precedence; that is, they are evaluated in the left-to-right order in which they appear. Arithmetic and logical operators are evaluated in the following order of precedence. Read More