Hi all, Today I am going to speak about an important and well equipped feature of Selenium2.0 PageObjects and PageFactory. Advantages: 1. Max re-usabality 2. Easy to modify the elements locator strings as it will have only one place for each element 3. Well understandable framework 4. Neatly designed and easy to code. Page Objects: Elements on a page or parts of a page called page objects. We can design a class which consists constructors, WebElements including locators, Getters, Setters of some web elements of a page. ie. Services done by part of a page (application). By using this class, we will instantiate using Page Factories and use the instance to do the services. So for every element, our full test script contains the locators in one place only. Likewise, we have design classes for every operations done by particular page and use the instances to do the operations. Example: You can build your Page Object of the Common Web Elements (just invented this name :)...
Sharing ideas with automation testers and Enjoying the ride...