Sample Selenium Page Object Model (Page Factory) with TestNG
Simple step by step instruction to set up Page Factory.
Step 1: Take an example of simple test case of LogIn application and understand where we can use Page factory.
Step 2: Implement Page Factory in the LogIn test case
Step 3: Use Annotations of Page Factory
Step 4: Divide the single Page Factory Objects in to different Page Classes
Step 5: Combine set of repetitive actions in to methods to implement Modularization.