UFT/QTP – VBScript Tutorial Part -1

VBScript stands for Visual Basic Scripting. This Scripting language developed by Microsoft, supported by Internet Explorer. VBScript is the primary scripting language for Quick Test Professional (QTP), which is a test automation tool.

Data Types

VBScript has only one data type called a Variant. A Variant is a special kind of data type that can contain different kinds of information, depending on how it’s used.

Variant data types divided into sub data types according to behavior of data type.  Like – Empty, Null, Boolean, Byte, Integer, Currency, Long, Single, Double, Date, String Object Error. Read More

UFT/QTP – Synchronization

Synchronization is the time interface between tool (like QTP) and Application under test.

Synchronization is used to match the speed of UFT test script execution with the speed of the application under test.

UFT test can be synchronized in the following way : Read More

UFT/QTP – Output Values

An Output value step, is step in which one or more values are captured at a specific point in your test and stored at a desired location. The stored values can be used as input at a different points in test script.

You can output a value to:

  • A test or action parameter
  • The run time data table
  • An environment variable

Read More

UFT/QTP – Parameterization

UFT enables you to extend the scope of a basic test by replacing fixed values with parameters. This process is know as parameterization which increases the power and flexibility of test.

Types of Parameters

Depending upon the data, Parameterization is divided into 4 categories.

  1. Data Table Parameterization
  2. Test/Action Parameterization
  3. Environment variable Parameterization
  4. Random number Parameterization

Read More

UFT/QTP – Check Points

A checkpoint is one of the options provided by UFT to enhance the script.

Checkpoints are verification points used to compare actual value (actual value is present in the application) with the expected value (Expected value is supposed to be in the application) which can be inserted at any point of time in the script.

Types of Checkpoints

UFT provides the following types of checkpoints:

  1. Standard Checkpoint
  2. Image Checkpoint
  3. Bitmap Checkpoint
  4. Table Checkpoint
  5. Text Checkpoint
  6. Text Area Checkpoint
  7. Accessibility Checkpoint
  8. Page Checkpoint
  9. Database Checkpoint
  10. XML Checkpoint From Application
  11. XML Checkpoint From Source
  12. File Content Checkpoint

Note – Using Standard checkpoint other checkpoints image, page & table can be applied. Read More

UFT/QTP – Actions

Actions help to divide your test into logical units. Actions are similar to functions in VBScript, however there are few differences. When you create a test, it include one action by default.

You can divide your test into multiple actions by:

  • Creating new actions and inserting calls to them
  • Inserting calls to existing actions
  • Splitting existing actions

Read More

UFT/QTP – Object Identification

UFT performs actions on the objects of an application by learning and identifying the objects in the application. The Process of uniquely identifying an object from the application is called as object identification.

UFT uses two modes of object identification to recognize the objects uniquely.

  • Normal Identification
  • Smart Identification

Normal Identification – This is a default object identification mode in this mode UFT has two list of properties based on which it will identify the object. First list is the mandatory properties. UFT learns these default properties values and checks if any object matches the description. If object not found uniquely in the application  it adds properties from the second list called as assistive properties. Assistive properties added one by one till an unique object is not identified.

“Mandatory properties are properties that UFT always learns for a particular test object class.”

Assistive properties are properties that UFT learns only if the mandatory properties are not sufficient to identify unique object” Read More

UFT/QTP – Object Repository

An Object is an element that is present in the application . All the elements of the applications are considered as objects. Each object belongs to particular class like list box, edit box, button. image, link etc.

Object Repository is a collection of object and properties with which QTP will be able to recognize the objects and act on it. When a user records a test, the objects and its properties are captured by default. Without understanding objects and its properties, QTP will NOT be able to play back the scripts.

Object repository acts as a container to store test objects. Test object is the object created by QTP in the test script to represent the object present in the application.

Read More

UFT/QTP – Modes of Recording

HP UFT (QTP) supports 4 types of recording modes

  • Normal Recording : This is the default Recording mode. Normal recording mode records the objects in your application and the operations performed on the application under test.      Navigation: Record >> Record or Record Button or press short key F6
  • Analog Recording : This records not only the keyboard actions but also the mouse movements relative to the screen or the application window.     (Analog Recording Mode should be used only when mouse movement is essential like signatures and drawings)

Read More

UFT/QTP – Record and Playback

Recording a test corresponds the user actions of the application under test so that UFT automatically generates the scripts that can be played back. Record and Playback  gives us the first impression if the tool can support the technology or NOT if the initial settings are done correctly.

Steps for Record and Playback are as follows: Read More