As most of the
commercial automation tools has feature of object repository concept, which separate
application objects from automation scripts, it help us to modify object
when AUT object change without going into code. Also if we create object repository then it
reuse throughout scripts from one place.
In Webdriver we can
put locator (object) of web elements in to xml, properties, excel file etc at one
place, and can separate from test scripts with logically divided into files.
In this post I am
going to show you how to read data and put locators into xml files.
We create xml files
for object locator like “Header.xml” where put all locators related to header
menus, “Login.xml” for locators of login page, “Dashborad.xml” for locator of
dashboard page.