Browse Category
Accounting Payroll (63)
Automobiles (716)
Book Marketing (68)
Branding (475)
Business (7259)
Career Advice (195)
Careers Employment (126)
Change Management (15)
Communications (459)
Computers and Technology (2508)
Consulting (103)
Diseases STDs (4)
Finance (1206)
Food and Drink (421)
Franchising (30)
What is Selenium WebDriver Object Repository and how to utilize?
Published in Software on Jun 19, 2017
Rating :
Total Hits :921

Selenium Webdriver offers no protest vault execution as a matter of course. Be that as it may, actualizing and utilizing a fundamental question store is truly clear. In this article,  will demonstrate to you best practices to do it and how to help the weight of test script support along these lines.

Not at all like QTP/UFT, Selenium does not offer the default execution for protest store. In QTP things are truly clear, simply protest see the controls and add to question vault, and further with the endowments of intelligence highlight in its IDE, use them effortlessly in composing scripts.

However, how we can accomplish the same in selenium?

It should be possible by utilizing Properties document highlight of Java.

What is Object Repository?

Question Repository is an incorporated area where we can store objects data, it goes about as interface between Test script and application with a specific end goal to distinguish the items amid the execution.

We generally suggest utilizing outer document for question archive as opposed to hard coding the articles and its properties straightforwardly into our code. Why this??? As it diminishes the support exertion and gives positive ROI, for instance say any of the question properties change inside our application under test, we can undoubtedly transform it in outer protest storehouse record, as opposed to scanning and doing refreshes for that question exclusively in the code.

Protest Repository Samples: -

Part - System Admin

  • ManageUsers.Properties
  • ManageDepartments.Properties
  • ManageLocations.Properties

Why and How to utilize Object Repository?

To play out any activity we require locators. Instrument will play out any activity in view of the locators. For every single activity instrument relies on upon these locators. On the off chance that the apparatus does not recognize the locators, it basically tosses a blunder as Locator/Element Not Found or Identified.

With a specific end goal to ensure the apparatus executes easily, we have to give precise one of a kind identifier/locators.

We have to keep every one of the locators at one place where we can without much of a stretch alter the locators/recognizes if there are any UI changes in the application.

If not, it will wind up noticeably hard to change even one locator, as it will be utilized at a wide range of spots in test scripts.

It is constantly better to keep locators in a different record and at effectively open area. It ought to be characterized in such a way if any new individual participates amidst the venture, he/she ought to be equipped for rolling out improvements/adding any new locators to the record.


An essential protest vault can be executed as an accumulation of key-esteem sets, with the key being a legitimate name distinguishing the question and the esteem containing interesting articles properties used to recognize the question on a screen. For this, we will utilize a .properties record in Java which is a fundamental gathering of key-esteem sets.

Making Properties File in Eclipse:-


Right tap on the Package in the arrangement Explorer of Eclipse-> New - >Other


General - >File - >Click Next


Offer name to the document with .properties augmentation (Say - >Click Finish

Including Key/esteem Pairs in Properties File:-

Before including our items into question archive, how about we diagram a straightforward situation that we will be robotizing in Selenium:-

1. Dispatch Gmail login page.

2. Fill the Username and Password fields and tap on Submit catch

In the wake of making our unfilled properties document, now we have to include our components, as key and Value sets.

For Example:-

Gmail.LoginPage.txtPassword - > Key


With this clear instrument we have possessed the capacity to immensely diminish the measure of time required for script upkeep on the off chance that protest properties change. All it takes is a refresh of the proper sections in the question outline we're ready and run our tests once more.

About Author:

Infocampus is a best selenium training institute in Bangalore. Free demo classes will be conducting. Placement assistance will be provided as infocampus is tied up with 100+ clients. Contact 9738001024 to get more information on Selenium Courses in Bangalore. Visit to make an enquiry.

Siyaram Ray - About the Author:

Infocampus Training institute provides training on different software technologies. Contact 9738001024 for more details.
Rate Article 
Like the PressRelease? Then share it with others at popular websites below:
3 Different types of wedding silk sarees
Silk is charismatic as well as charming. You are sure to feel enthralled while adorning yourself in a silk saree.
By Indian Silk House - Jun 21, 2017
Know The Facts Behind Auto Delux Classified Script
If anyone wants to start his own business then auto delux classified script is the best answer for it. It is great platform for selling and purchasing second hand vehicles.
By sawati - Jun 21, 2017
Gearing up for winter camping in comfort
There are many good reasons to head out camping off-peak - to get first pick of the best camp sites, enjoy quieter roads and walking tracks, master your wild-windswept-winter photography and the chance to cozy-up beside a roaring campfire with a group of good friends.
By Micks Gonebush - Jun 21, 2017
Best Places to Visit in Vellore
Chennai, being the cultural capital of Tamil Nadu not only reflects the rich cultural heritage of ancient India but also offers the best weekend getaways to revitalize yourself. From beautiful lawns to adventurous theme parks to serene beaches, Chennai is known for these but wait, after five days of heavy load, your family and you need a die-hard break from your routine and one such place to refresh your soul is Vellore. Vellore though known by many as one of the hottest places in the Southern part of our nation also has a huge bucket list
By Henry - Jun 21, 2017
7 health benefits of curd you should definitely know
From consumption to hair and skin application it helps the human body in many ways. Read more to know the many health benefits of curd.
By - Jun 21, 2017
Your Name: *
Website URL: *
Notify me of follow-up comments via e-mail
Enter the code shown:
* Required fields
Google Ads