Interview Questions

Selenium WebDriver - What is Object Repository? How can we create Object Repository in Selenium?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - What is Object Repository? How can we create Object Repository in Selenium?

Object Repository is a term used to refer to the collection of web elements belonging to Application Under Test (AUT) along with their locator values. Thus, whenever the element is required within the script, the locator value can be populated from the Object Repository. Object Repository is used to store locators in a centralized location instead of hard coding them within the scripts.
In Selenium, objects can be stored in an excel sheet which can be populated inside the script whenever required.

(Continued on next question...)

Other Interview Questions