Sunday, November 29, 2009

22. Object Repository Manager & Associate Repository:

Object Repository Manager is also called as Shared Repository.
By Using Object Repository Manager we are Capturing some objects and saving this captured objects but we are not recognizing anything to the QTP.
Now we can share this captured action to any test.
If you plan to use shared objects in a test, you can create a shared object repository before you create the test. A Shared object repository can be used for multiple tests. Multiple shared object repositories can store shared objects.
You specify the shared object repositories that you want to use for an action in a test before you record a test. You can also create new shared object repositories and associate these repositories with an action in a test after you record the test.

To create and manage shared object Repositories
Step 1:
Open the Application that you want to Capture.
Step 2: Open the Object Repository Manager by Resources>Object Repository Manager.
Step 3: Object Repository Manager Dialog box appears.
Step 4: Select Object> Add Objects to add the objects to Repository Manager (or) click on Add Objects icon in Tool Bar.
Step 5: After Clicking Add Objects to Local it shows Hand Symbol, by using this Symbol click on the application (Which you want) to Capture the Objects.
Step 6: After Capturing Object Selection-Add to Repository dialog box appears, Click on OK.
Step 7: Define Object Filter dialog box appears, select All Object types Radio Button to capture all the objects in the Application for Recognition, Click on OK.
Step 8: Now in the Object Repository Manager dialog box captures all the objects from the application.
Step 9: Now Click on Save Button to save the Captured Objects in the Repository Manager.
Step 10: Now just close the Object Repository Manager.


Note:
Now if you try to write the script in the test it will not accept your script because we used Object Repository Manager only for Capturing not for Recognition.
Note:
Now we want to recognize the saved Repository to write the Script. For Recognition purpose use Associate Repository.
Note:
You want to use Object Repository Manager compulsorily we want to Use Associate Repository for Recognition Purpose.

Step 11: To Open Associate Repository Resources>Associate Repository.
Step 12: Associate Repository dialog box appears.
Step 13: Click on Add Repository Button to open the saved Repository.
Step 14: Select the Action 1 in the Available Action Field and click on button to add the Action to Associate Actions, and then click on Ok to Recognize the Repository.
Step 15: Now Enter the Script in QTP.

Note:
Use the Object Repository Manager to manage all shared object repositories at one central location. In the Object Repository Manager you can:
Create a shared object Repository.
Associate Object Repositories to actions.
Add objects to a shared object repository.
Save a shared object Repository.
Modify an object in a shared object repository.

No comments:

Post a Comment