0% found this document useful (0 votes)
221 views16 pages

QTP Object Identification and Properties Guide

QTP,VBScript,qtp script,qtp scripts,Automation,automation framework,automation estimation technique,automation estimation technique, QTP Interview questions,QTP real time scripts,sample vbscripts, QTP Sample Certification questions, qtp exam questions, hp qtp certification questions, QTP Certification HPO-M16 - Skill Review Test,QTP Guide, QTP Testing, Quick Test, QuickTest Professional, quicktest Pro, quicktest professional,qtp tutorial,qtp 10 tutorial,automation frameworks, qtp framework, test automation by qtp

Uploaded by

Ramu Palanki
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
221 views16 pages

QTP Object Identification and Properties Guide

QTP,VBScript,qtp script,qtp scripts,Automation,automation framework,automation estimation technique,automation estimation technique, QTP Interview questions,QTP real time scripts,sample vbscripts, QTP Sample Certification questions, qtp exam questions, hp qtp certification questions, QTP Certification HPO-M16 - Skill Review Test,QTP Guide, QTP Testing, Quick Test, QuickTest Professional, quicktest Pro, quicktest professional,qtp tutorial,qtp 10 tutorial,automation frameworks, qtp framework, test automation by qtp

Uploaded by

Ramu Palanki
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

QTP Object Identification

 How QTP identifies object during and


after recording
 How to use Object repository to view the
captured Object Properties
 How to use Object Spy to view run-time
object properties
 Test Object and Run Object properties

March 26, 2003 Fore more QTP Realtime Scripts, visit 1


www.ramupalanki.com
QTP – Object Properties

 A set of characteristics that define an


object’s appearance, values, state and
identity in an application.
 Different objects in application are
Image, List Item, Edit box, check box,
radio button, Hyperlink and
Submit/Command button.

March 26, 2003 Fore more QTP Realtime Scripts, visit 2


www.ramupalanki.com
QTP – Test Object Model

 The test object model is a large set of


object types or classes that Quick Test
uses to represent the objects in your
application.
 A test object is an object that Quick Test
creates in the test to represent the actual
object in your application.

March 26, 2003 Fore more QTP Realtime Scripts, visit 3


www.ramupalanki.com
QTP – Test Object Model

 Quick Test stores information about the


object that will help it identify and check
the object during the test run.
 A run-time object is the actual object in
your Web site or application on which
methods are performed during the test
run.

March 26, 2003 Fore more QTP Realtime Scripts, visit 4


www.ramupalanki.com
QTP – Recognizes Objects
during Recording
Quick Test creates a unique identity for an
object by:
 Recognizing the Object type (“Class”).
 Learning the Object’s properties.
 Assigning a “logical name” to the learned
object.

March 26, 2003 Fore more QTP Realtime Scripts, visit 5


www.ramupalanki.com
QTP Object – Example
For example, suppose you click on a Find
button with the following HTML source code:

 <INPUT TYPE="submit" NAME="Find"


VALUE="Find">

Quick Test identifies the object that you clicked


as a Web Button test object. It creates a Web
Button object with the name Find, and records
the following properties and values for the Find
Web Button:

March 26, 2003 Fore more QTP Realtime Scripts, visit 6


www.ramupalanki.com
QTP – Object Example

Browser("Mercury Interactive").Page("Mercury Interactive").


WebButton("Find").Click

March 26, 2003 Fore more QTP Realtime Scripts, visit 7


www.ramupalanki.com
QTP – Object Properties

 The GetTOProperty methods enable you to


retrieve a specific property value that Quick
Test uses to identify an object.
 The SetTOProperty method enables you to
modify a property value that Quick Test uses to
identify an object.
 You use the GetROProperty method to retrieve
the current value of a test object property from
a run-time object in your application.

March 26, 2003 Fore more QTP Realtime Scripts, visit 8


www.ramupalanki.com
QTP – Object Repository

 When you record a test, Quick Test adds


each object on which you perform an
operation to the Object Repository.
 Test Object information is stored in
Object Repository.
 You can also add objects to the object
repository while editing your test.

March 26, 2003 Fore more QTP Realtime Scripts, visit 9


www.ramupalanki.com
QTP – Object Spy

 The Object Spy also enables you to view


both the run-time object methods and
the test object methods associated with
an object.
 The Object Spy displays the object
hierarchy tree and the run-time object
methods or test object methods
associated with the selected object in the
Methods tab of the Object Spy dialog
box.
March 26, 2003 Fore more QTP Realtime Scripts, visit 10
www.ramupalanki.com
QTP – Object Identification
properties

 If you expect that the values of the


properties currently used in the object
description may change.
 Then you can modify the mandatory and
assistive properties that Quick Test
learns when you record on an object of a
given class

March 26, 2003 Fore more QTP Realtime Scripts, visit 11


www.ramupalanki.com
QTP – Object Identification
properties
 Select the Test Object’s environment
 Add or Remove Mandatory properties
 Add or remove Assistive / Secondary
properties.
 You can specify a new property by
clicking New and specifying a valid
property name in the displayed Object
classes dialog box.

March 26, 2003 Fore more QTP Realtime Scripts, visit 12


www.ramupalanki.com
QTP – Ordinal Identifier

 An ordinal identifier assigns the object a


numerical value that indicates its order relative
to other objects with similar descriptions.
 Acts as a third line of identification when
mandatory and assistive properties are still not
sufficient
 Types of ordinal identifiers:
 Index – indicates order of the object relative to
other similar objects
 Location – Indicates order of the object relative to
its location in the parent window/page

March 26, 2003 Fore more QTP Realtime Scripts, visit 13


www.ramupalanki.com
QTP – Objects Require more
time

 When you run tests, your application


may not always respond with the same
speed. For example, it might take a few
seconds:
for a progress bar to reach 100%
for a status message to appear
for a button to become enabled
for a window or pop-up message to open

March 26, 2003 Fore more QTP Realtime Scripts, visit 14


www.ramupalanki.com
QTP - Synchronization

 You can handle these anticipated timing


problems by synchronizing your test to
ensure that Quick Test waits until your
application is ready before performing a
certain step.
 You can insert a synchronization point,
which instructs Quick Test to pause the
test until an object property achieves the
value you specify.
March 26, 2003 Fore more QTP Realtime Scripts, visit 15
www.ramupalanki.com
QTP – Wait Statement

 You can enter Wait statements in the


Expert View to instruct Quick Test to wait
for a window to open or an object to
appear.
 Wait statements instruct Quick Test to
wait a specified amount of time before
proceeding to the next step.

March 26, 2003 Fore more QTP Realtime Scripts, visit 16


www.ramupalanki.com

You might also like