Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Wednesday 17 June 2015

Object Repository in UFT

Object Repository is second most important component in UFT after addin manager it has extradinary features and it will support developers to perform task easily.

Object Repository:

              Object Repository is a file where we are storing object properties and values so that we can perform actions based on those properties and we can modify those properties according to our test requirement.

How to Open Object Repository in UFT:

Navigations:

1."Resources" menu from menubar----->Object Repository
2.CTRL+R
3.by clicking on Object Repository button as shown in below

















Generally object repository is divided into the following two types
  1. Per Action Repository
  2. Shared Object Repository
1.Per Action Repository:

Per action repository means for each action we have one repository by default so A repository file is stored with each action that we created

Per -action repository satisfies the following list of points

1.UFT creates a new blank Object repository for each action,as shown in below.



























2.As we record operations on objects in our application UFT automatically stores the information about the objects.

3.When we create new action,UFT creates another new Object Repository.

here I created new action UFT creates action with repository as shown in below
























4.If we record same object in two different actions the object is stores as a separate test object in each object repository.

5.Per Action Repository extension is -->.MTR(Module Test Repository )


2.Shared Object Repository:

Shared Object Repository is repository file where we use same file for all actions in our test.The extension we used for Shared Object Repository is (.tsr{Test Shared Repository})

here test Objects are stored into Object repository while we are recording and they will be used for scripting and any other requirement.

Adding Objects to Object Repository:

There are two ways to add Objects in Object Repository

1.Through Recording
        when the tool in normal recording mode what ever the objects that we record those will automatically stores into Object Repository.

2.Pre-learning(Manually Adding):

          In this process we add object by Object selectively or all objects available in the window can be added at a time to repository then we start with scripting.

Navigation:

Resources from menu bar--->Object Repository--->Object--->Add objects to local as shown below


















or
Resources from menu bar--->Object Repository--->Add Objects to Local from tool bar

















Once we click on Add Objects to local our mouse control becomes hand icon as we get in object spy then click on required object if it is independent test element it will automatically stores in to Object Repository or if the selected object is container like it contains multiple objects we need to click on ok,the scenarios as shown in below



































After clicking on OK you will get the below window select the required option




















the options behavior is as follows:

1.Selected Object Only:

if we select this then it adds to the object repository the previously selected objects's properties and values without its descendant objects.
****here previously selected object means only login dialog will add with out any objects that are present  inside that login dialog./only Parent

2.Default object Types:

If we select this option it will add the previously selected object and all the functional objects in side that object to the Object Repository.

All objects are stored with their properties and values in OR



















3.All object Types:

if we select this one it will store selected object,all functional,non functional objects inside that Object as shown in below

























4.selected Object Types:

Here when we select this option the select button will enable and if we click on this we can set preferences which objects we want to select according to that filter,all objects in side selected objects will stored into Object Repository





















select the required option click on ok corresponding objects will add to Object repository which will helpful while writing scripts.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.