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 / UFT Multiple Choice Questions & Answers QTP / UFT Multiple Choice Questions & Answers Here is the most UFT popular Questions and Answers 1. The toolbar enables you to view the details of an individual action or the entire test flow is 1. Testing toolbar 2.… Read More
  • UFT Keyboard Shortcut commands UFT Keyboard Shortcut commands  Frequently Used Shortcut keys: To comment block of statements: Ctrl+M To uncomment block of statements: Ctrl+Shift+M To apply “With” to script: Ctrl+W To remove “With” from script: Ctrl… Read More
  • Tell me about yourself Outline in Software Testing Outline Tell me about yourself in Software Testing  Ø  How long you’ve been working in the field Ø  What you’ve done as a QA Professional o   SDLC Phases o   Methodologies you’ve work… Read More
  • UFT 220 interview questions 2020 UFT 220 interview questions and answers 2020 Automation testing UFT 220 interview questions and answers 2020 Q. 1: What is Automation Object Model in QTP? Like we use QTP for automating the testing of our applications, we … Read More
  • UFT Real time Scripts 2020 For more QTP Realtime Scripts,  MS Excel Scripts '''Script to create a new excel file , write data '''save the file with read and write protected '''''pwd1 is for read protected pwd2 is for write protected Set xl=Crea… Read More

0 comments:

Post a Comment

Blog Archive

Translate

Popular Posts

Total Pageviews

151,758

Blog Archive