UFT Class 7 - UFT Object Repository

UFT Class 7: UFT Object Repository
What is Object Repository?

It is a storage place to store Test Objects information.

Two types of Object Repository in UFT:

i) Local Object Repository

ii) Shared Object Repository

i) Local Object Repository

UFT creates a local repository for every Action automatically during Recording.

User can edit local objects (Add, Rename, delete)

It is an internal file, UFT save local repository files along with Test Scripts.

ii) Shared Object Repository

User creates Shared object Repository files either By Adding objects or By exporting Local objects.

Shared object Repository files are External files, user need to maintain external files.

User can edit shared objects.

Shared object Repository file extension is .tsr
Operations on Object Repository:

i) Add Objects (Local and Shared)

ii) Rename Objects (Local and Shared)

iii) Delete Objects (Local and Shared)

iv) Export Local objects

v) Merge Object Repositories

vi) Associate Shared object Repositories

vii) Load Shared Object Repository at Run-time.

RepositoriesCollection.Add "Path of the Shared Object Repository"

RepositoriesCollection.Add "C:\Users\G C REDDY\Desktop\Login.tsr"

viii) Map Objects in between OR and AUT

View options

a) Highlight in Application (OR to AUT)

b) Locate in Repository (AUT to OR)
ix) Export Shared objects to XML/Import from XML

x) Define New Test Objects
Dynamic Handling of Object Repositories:

RepositoriesCollection.Add "C:\Users\G C REDDY\Desktop\Login.tsr"
SystemUtil.Run "C:\Program Files\HP\Unified Functional Testing\samples\Flights Application\FlightsGUI.exe"
WpfWindow("HP MyFlight Sample Application").WpfEdit("agentName").Set "john"
WpfWindow("HP MyFlight Sample Application").WpfEdit("password").Set "HP"
WpfWindow("HP MyFlight Sample Application").WpfButton("OK").Click
Posi = RepositoriesCollection.Find("C:\Users\G C REDDY\Desktop\Login.tsr")
RepositoriesCollection.Add "C:\Users\G C REDDY\Desktop\Orders.tsr"
wpfwindow("HP MyFlight Sample Application").WpfComboBox("fromCity").Select "London"
WpfWindow("HP MyFlight Sample Application").Close

No comments:

Post a Comment