Tuesday, January 8, 2019


The concept of Object Repository (OR)


Add Objects:

Resources --> Object Repository (Ctrl+R) --> Objects --> Add Objects to Local --> Choose the Auto (or) Object --> All object Type

By doing above operations in Resources menu in QTP objects are been added                          
Save OR:

OR - Window --> Export Local Object -->  File Name

By doing above operations in Object Repository menu under Resources in QTP OR is saved.

Associate Repository:

Resources --> Associate Repository --> (+) click --> Choose tsr file --> Available Action --> Action 1 -->   Associate Action --> OK

By doing above operations the created objects (.tsr) are been added to the Associate Repository

(or)

we can add the path of the .tsr file which indicates the repository where it get stored

RepositoriesCollection.Add "C:\Program Files (x86)\HP\QuickTest Professional\TSR\flight.tsr"
Systemutil.Run(""C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4b.exe")
Dialog("Login").Active
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Close

So, as per the above script if the qtp play backs these scripts, even if the objects are not assigned to associate repository (RepositoriesCollection.Add "C:\Program Files (x86)\HP\QuickTest Professional\TSR\flight.tsr") the given script will bring the stored objects from the targeted path.





Related Posts:

  • QTP Crypt Object QTP Crypt Object Crypt Object in QTP is used to Encrypt the given password, This scenario is just to confirm whether the given password is saving as Encrypted, This object is used in different ways in different methods,Belo… Read More
  • Capture Bitmap Method in QTP Capture Bitmap Method in QTP Capture Bitmap:            This method is used to capture the image from the selected object. The captured image will be save in the given path in the bitmap… Read More
  • Descriptive Programming (DP) in QTP Descriptive Programming (DP) in QTP Descriptive Programming in QTP will be write in the case of the objects are not present in the Object Repository (OR), This method of programming reduces the time for automation… Read More
  • QTP Methods QTP Methods QTP methods are used to extract the properties of a selected object in an application, There are some list of properties that comes under QTP methods, Capture Bitmap Child Objects GetRoProperty GetToProperty G… Read More
  • GetROProperty Method in QTP GetROProperty Method in QTP GetROProperty method is used to identify an object in an Run time, It retrieves the properties and values where the QTP is recorded also the property is listed in the script. Here we ca… Read More

0 comments:

Post a Comment

Blog Archive

Translate

Popular Posts

Total Pageviews

152,296

Blog Archive