UFT Class 9

UFT Class 9

(Descriptive Programming Part-1)

Descriptive Programming Or Programmatic Descriptions

Enter / Provide objects information directly into statements/steps
is called Descriptive Programming.

No need to have Object Repositories separately, we provide objects info
directly in the Test/Test script only.

Descriptive Programming is faster in execution than object repository based Test.

Object Repository based Test Design

Recording Keyword driven methodology
———————————————————-
Test external view Same

Internal process Uses Local Repositories Shared object repositories
————————————————————————–
Test External view:

Test object statements vary from OR based test to DP

Discriptive Programming in UFT Testing

Test Object Statements:

Single Test Object Statement

OR:
Syntax:
TestObject(“Objectname”).Operation
Ex:
Dialog(“Login”).Activate

Browser(“Google”).Close

DP:
Syntax:
TestObject(“Property Name:=Property value”).Operation
Or
TestObject(“Property1 Name:=Property1 value”,”Property2 Name:=Property2 value” ).Operation

Object

Object is something which has structure and properties

Property

It is an attribute of the object, which describes the Object

Method / Operation

Operation on Object
———————————–
Object

Man

Properties Values

Name abcd

Color White

height 6

weight 70

etc…

Methods
———
Speaking
walking
etc….
—————————-
Browser

Properties:

title
Version Ie 9
name Gmail
openurl
etc…
———————————————-
Ex:

Browser(“CreationTime:=0”).Close
Dialog(“text:=Login”).Activate
Or
Dialog(“text:=Login”, “width:=320”, “height:=200”).Activate

Two Test Objects statement

OR:
Syntax:

Test Object(“Object Name”).Child TestObject(“ObjectName”).Method / Operation

Ex:
Dialog(“Login”).WinButton(“OK”).Click

DP:

Syntax:
TestObject(“Property Name:=Property Value”).Child TestObject(“PropertyName:=PropertyValue”).Method or Operation

Ex:

Dialog(“text:=Login”).WinButton(“text:=Cancel”).Click
—————————
Ex:
Browser(“CreationTime:=0”).Page(“title:=Gmail”).Link(“text:=Create an account”).Click

Internal Process:

Test Execution Process in case of OR based Test:

During test execution UFT reads statements from UFT tool editor one by one
and gets objects information from Object Repository
based on that information performs actions on AUT.

Test Execution Process in case of DP:

During test execution UFT reads statements from UFT tool editor one by one
and objects information also available in the Statements
based on that information performs actions directly on AUT.

Follow me on social media: