There are two types of repository available in QTP.
Follow @TestingQ
- Local repository (.MTR extension)
- Shared repository(.TSR extension)
Local Repository:
Every action in a test will have one local repository (local repository created
automatically once you create a new action). The information present in
this repository can be used only by that action. Local repository will
be created and manged by the QTP itself.
Point to be remembered
- QTP creates a Local Repository for every action automatically. That cannot be shared among tests.
- User can add objects to Local repository.
- User can perform rename, delete operations in local repository. As it is QTP internal file user no need to save modifications.
- Navigation: Resource menu>object repository (Short cut key Ctrl+R)
Adding objects
Navigation: open local repository (resource menu>object repository)
>objects>Add objects to Local>show the object>click ok
(No need to save separately, it saves automatically)
It will pop up the below options
· Selected object only
· Default object types
· All objects types
· Selected object types
(If
we select first option it stores Selected objects only, if we select
second option it stores all default objects, if we select third option
it stores All objects including static objects, if we select fourth
option, we have to select object classes then it stores that class
objects, we can select more than one class also.)
Renaming objects
Resources
> object repository >select object and right click >choose
rename option >modify the name>release the mouse.>close
repository
Deleting objects
Resources
> object repository >select object and right click >choose
delete option >confirm deletion>. >close repository