QTP Virtual Objects

Most of QTP users are very familiar with Virtual Objects because it solves unrecognized application objects problem. Sometime we work with those applications that have different types of objects but tool does not recognize and support those objects as object. So for this kind of problem every successful tool provides the facility to recognize those objects as Virtual Object.

QTP tool is also providing same and easy steps to define the Virtual Object. Basically we used Virtual object functionality when tool does not support any application object as object.

As we discussing Virtual Object in respect to QTP tool, there some important points which should get the notice by every QTP users.

Point 1: Define the Virtual Object size and position in the web page by using the crosshairs pointer.

Point 2: During a run session make sure that application window should come in same size and same location. May be it effect the coordinates of virtual object.

Point 3: We can not insert any checkpoints for virtual object.

Point 4: We can not use Object Spy for virtual Object.

Point 5: We can use Virtual Object only in recording and running session.

Point 6: Virtual objects store in the computer, not only for current test.

Point 7: We can define the virtual object only for those object in which, we can click or double click.

We can see the all defined virtual objects with the help of Virtual Object Manager window. Basically it list out the all created virtual objects. We can delete or disable the objects with the help of Virtual Object Manager and Options windows. Virtual Object Manager window provide the facility to delete the objects after selecting them and if you want tool should keep the objects but don’t recognize, for that you have to check the option “Disable recognition of virtual objects while recording” in Tool > Options window.

I think these are the basic and important points for those who want to use Virtual Object feature in QTP and if I’m missing something please update with your valuable comments

Advertisements

QTP Test Object Model

To understand Test Object Model we can break it in three different terms, that are-

Object

Test Object

Test Object Model

Object, one of the units of your application.

Test Object, If QTP performs any operation on application Object and stores it for testing then we called it Test Object.

Test Object Model, QTP contains large set of Object types that it uses to recognize the application object.

I think now we can discuss about it in details. QTP uses this concept to tell the QTP engine that how tool will record the Object and Object Operation of the application. As I said that Test Object Model is large set of Objects which it uses to understand the objects but how QTP recognize the Object as Test Object and how it know that what type of operation tool has performed over the Object. For that QTP have different types of Class that represent the each and every Test Object of QTP. We can describe the Class mean like Four Wheeler is the class but different Cars are the object of the “Four Wheeler”. So classes are having different type of Properties and Methods that Test Objects uses to simulate the application objects.

Basically Properties use to recognize the type of Objects and Methods use to recognize the performed operation over the Object. So with the help of Properties and Methods QTP understand the application objects and performed action which are done by Tester and recorded by QTP.

So in simple word QTP uses Test Object Model to recognize the objects of the application.

QTP Shortcut Keys

My first CTO says that if you want to be smart user of the system, use shortcut keys to handle your system. So I thought that why should not post the list of QTP shortcut keys for QTP users

May be in these most of shortcut keys are common for most of guys but here most of guys are still newbie in QTP.

Ctrl + N- Creates a New Test

Ctrl+Shift+N- Creates a New Business Test

Ctrl+Alt+N- Creates a New Application Area

Shift+Alt+N- Creates a New Function Library

Ctrl+O- Opens an Existing Test

Ctrl+Shift+O- Opens an existing business component

Ctrl+Alt+O- Opens an existing Application Area

Shift+F2- Rename the Action name

Ctrl+M- Make the comment on current row

Ctrl+Shift+M- Remove the comment

Ctrl+Space- Completes the word if you are typing any VBScript method or object in Expert View

F12- For Standard Checkpoint

Ctrl+F12- For Standard Output Values

F7- Step Generator

F8- New Step in Keyword View

Shift+F8- New Step after block of statement

F3- Recording

F4- Stop the Recording

F5- Run the Script

Ctrl+F5- Run the selected step in the script

Ctrl+R- Open the object repository

Shift+Alt+F3- Analog Recording

Ctrl+Shift+F3- Low Level Recording

F11- Step Into

F10- Step Over

Shift+11- Step out

Ctrl+F10- Run to Step

Ctrl+T- Adds the selected item in the Watch tab

Ctrl+F7- Check the Syntax error in the script.

Ctrl+Page Up or Page Down- Toggles between the Keyword and Expert View.

You can add more if I’m missing some shortcut keys.