Tuesday, August 7, 2012

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.

5 comments:

  1. Django online classes provide interactive learning guided by experienced instructors. It focuses on practical coding exercises. This django online classes strengthens development understanding. Students create live web projects. Backend logic is included. Database models are covered. Practice sessions are conducted. It prepares job-ready developers.

    ReplyDelete
  2. Insightful article! Learning data modeling class
    equips professionals to create efficient database structures, manage relationships, and organize complex data effectively.

    ReplyDelete
  3. An iOS course introduces learners to the fundamentals of mobile app development for Apple devices. It explains Swift programming, development tools, and application structure clearly. This ios course helps students gain practical coding experience through exercises and projects. Learners build applications to understand real-world use cases. The course prepares learners for careers in iOS development.

    ReplyDelete
  4. Very informative! Learning data modeling class
    helps professionals organize and manage data efficiently for better decision-making.

    ReplyDelete
  5. Salesforce Admin Course Online
    Online Salesforce admin courses are very flexible. This salesforce admin course online looks like a good one. You can learn at your own pace. Helpful for working professionals.

    ReplyDelete