How to implement object repository in Selenium


How to implement object repository in Selenium
OR
How to manage elements in Selenium
OR
Where do you place element locator in Selenium
 
In selenium, first we pick element locator of all elements on which we are supposed to perform our action and place in a property file(Here property file behave as Object Repository for Selenium)
 
Now wherever in our test case, element locator value is required. We fetch element locator value from properties file(this is called properties file because extension of this file is .properties)
 
To fetch value of element locator from property file, we need to create object of “ResourceBundle” class and by that object we can use getString method


No comments :

No comments :

Post a Comment