=================================================================== Below is the sample code for Page object model with page factory pattren. =================================================================== There are 3 classes as mentioned below: 1) Base Class: which contains all constants like page url, username, passord, filename etc. 2) Page class: which acts like object/webelement repositories like xpath/id/name or webelemnt objects instantiations and functions which have logic to do the operations on webelemnts. 3) test case class: this will actually perform the operations on webelements. Like enter data to textboxes, cliscking on a button, select dropdown values. =================================================================== Base class: below base class have a url, username and password are assigned. =================================================================== package POM; public class Constant { //URL that need to be test final static String ...
Blog which contains C#, asp.net, asp.net MVC, Selenium webdriver with core java, Bootstrap, Jquery and many more