QTP Certification Help

Advanced-QTP-Object-Model

QTP Object Model Reference
An object model is a structural representation of software objects (classes) that comprise the implementation of a system or application. An object model defines a set of classes and interfaces, together with their properties, methods and events, and their relationships.

QTP automation object model is a model to represent a real time objects which are there in the application. We can use the objects, its methods and properties to customize our testing needs.


What are the different Web Objects in QTP?

  • Browser - The Web browser. The name of the Browser test object is the same as the first recorded Page object.
  • Page - An HTML page.
  • Webedit - An edit box, usually contained inside a form.
  • Webbutton - An HTML button.
  • Webcheckbox - A check box with an ON and OFF state.
  • WebTable - A table containing a variable number of rows and columns.



What are the different Windows objects in QTP?

  • Dialog – A Windows dialog box
  • Window – A standard window.
  • WinEdit – A Windows edit box.
  • WinCheckBox - A Windows check box.
  • WinEdit - A Windows edit box.
  • WinButton - A Windows button.



What are the different Utility objects in QTP?
QTP has reserved objects that can be used for testing and result reporting preferences during a run session.

  • Crypt Object
  • DataTable Object
  • Description Object
  • DotNetFactory Object
  • DTParameter Object
  • DTSheet Object
  • Environment Object
  • Extern Object
  • LocalParameter Object
  • MercuryTimers Object (Collection)
  • MercuryTimer Object
  • Parameter Object
  • PathFinder Object
  • Properties Object (Collection)
  • QCUtil Object
  • RandomNumber Object
  • Recovery Object
  • Reporter Object
  • Repository Object
  • Services Object
  • Setting Object
  • TSLTest Object
  • XMLUtil Object



What is Description object in QTP?
“Description” - Creates a new, empty description object in which you can add collection of properties and values in order to specify the description object in place of a test object name in a step.
Example
set EditDesc = Description.Create()

EditDesc("Name").Value = "userName"

EditDesc("Index").Value = "0"

Browser("Welcome: Mercury").Page("Welcome: Mercury").WebEdit(EditDesc).Set "MyName”



What is Crypt Object in QTP?
This object Encrypts a string.

Syntax
Crypt.Encrypt(value)

Example
x = "mercury"
msgbox Crypt.Encrypt(x)