1. Home
  2. OpKey Help
  3. 7. Working with Object Repositories
  4. 7.2 Creating Object Repository through ‘Add to OR’

7.2 Creating Object Repository through ‘Add to OR’

 

Overview

OpKey offers a pragmatic feature of fetching objects with their properties and then collecting them into object repositories. This exceptional feature is named as “Add to OR”.

This method proves fruitful in case of testing and recording web applications.

Need of “Add to OR” feature in OpKey

Let’s suppose you have recorded few actions of any dynamic application through OpKey. Now, you wish to update its existing OR without repeating the recording process then you can do so in two ways:

  1. By Adding Objects Manually
  2. By “Add to OR” feature

Here, arises the need of “Add to OR” feature to fetch Objects along with their properties without any manual efforts and repetition of the recording process all over again.

It is an alternative way of adding objects in an existing Object Repositories.

Flowchart Explaining the Working of “Add to OR” feature in OpKey

Working of Add to OR in OpKey

  • First of all, create an Object Repository file.

                                              OR

  • Open an existing OR. The OR window will get opened.
  • Click on the Add to OR icon.

  • The “Add to OR” window will open up.
  • The OpKey Smart Recorder will get downloaded.  If it is not installed on your system, then install it.
  • Otherwise, Start the OpKey smart recorder.
  • Select any Browser.

  • Once the browser is opened, enter the desired URL over the browser. Press Control and hover the mouse over the web element you want to fetch. The Object Properties will get fetched.

  • Next, Click on Add Object. The Object will get added to the Object Repository.

 

 

 Getting Familiar with “Add to OR” Buttons :

 

Concept of setting Pivot on an Object

Pivot is used to establish relation between static and dynamic objects. Dynamic Object are the Objects which changes their properties at runtime while properties of static object remains the same.

For Example:

Let there be a static Object Company and a Dynamic Object Contacts. Now, if you want to establish a relation between Company and Contacts then:

You need to fetch the Object Company and set this as Pivot element by selecting the checkbox “Set Pivot” for the Object.

Now, fetch the Object Contacts and select relation as “near” or “in” w.r.t the pivot element Company.

 

In this way, you can set relation among the dynamic and static Objects in OpKey. This technique will help you to record dynamic objects and use them in Test case(s)/ Function Library.

Save the OR.

Congratulations! You have successfully added the objects in the Object Repository.
 

Using OR Data

You can use your Object Repository data with your test steps within Test Case or Function Library files.

Create a Test Case or Function Library file and add a Test Step.

Go to the Object Repository tab, browse your Object Repository file, expand it and map with the desired object.

Was this article helpful to you? Yes 1 No