11
How QuickTest Works with Objects USINGQTP65-STUDENT-01A

How QuickTest Works with Objects USINGQTP65-STUDENT-01A

Embed Size (px)

DESCRIPTION

Class Discussion: How QuickTest Identifies Objects In the Object > Method > Value model, how do you think QuickTest came up with “Fly From:?”

Citation preview

Page 1: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

How QuickTest Works with Objects

USINGQTP65-STUDENT-01A

Page 2: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

Lesson Objectives

In this lesson, you will:

Identify the components QuickTest uses to learn an object

Identify objects and their properties using the Object Repository

Investigate object properties using the Object Spy

Use a breakpoint and other run features to help you investigate an object

Page 3: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

Class Discussion:Class Discussion:How QuickTest Identifies ObjectsHow QuickTest Identifies Objects

In the Object > Method > Value model, how do you think QuickTest came up with “Fly From:?”

Page 4: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

How QuickTest Identifies Objects

1. Learns the object's parent window and the object properties

Object in Window “X”

Height is 20

Width is 52

Attached text is “First Name”

Enabled

ID is 0921456

2. Recognizes the object type (“class”)

This object is of type “Edit.”

3. Assigns a "Logical name" to the learned objectThis object will be known as “FirstName,” unique from all other objects in Window X.

Page 5: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

(1) Object Properties

What are object properties?A set of characteristics that define an

object’s appearance, values, state and

identity in an application.

Page 6: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

(2) The Object “Class”

Edit box

Drop down list

Button

QuickTest recognizes objects in an supported application and determines what type of object each is

Check box

Radio buttons

Page 7: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

(3) The Logical Name

The logical name is a value QuickTest usually takes from one of the object properties

The value is used as the identifying name of the object

Nativeclass: EditAttached Text: Agent Name:Enabled: TrueFocused: TrueHeight: 20Text: HaroldWidth: 119

Which of the object’s properties did Which of the object’s properties did QuickTest use for the logical name?QuickTest use for the logical name?

Page 8: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

The Object Repository

Note: Object properties are taken directly from the application’s API

The Object Repository is alocation within the test structure where QuickTest stores object information.

Object Repository

Sample objects (and their properties) included in the Login window that were captured during recording:- Agent Name field- Password field- OK button- Cancel button- Help button

Page 9: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

Functions of the Object Repository

Use the Object Repository to:

Rename logical names for readability

Add a new object in the repository

Configure the object properties used to identify an object (Add/Remove properties)

Page 10: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

Object Spy

A tool used to determine object properties and values of an object

Object location

Object property list

Page 11: How QuickTest Works with Objects USINGQTP65-STUDENT-01A

Adding Comments and Using the Debug Toolbar Use comments to document relevant steps and

changes in a test script

Use the common commands to stop and start a test a different points in the Debug toolbar

Pause

Step Into Step Out

Step Over AddBreakpoint

ClearBreakpointInsert a Comment interface

Debug Toolbar