Selenium Framework for Beginners 8 | How to implement POM in Selenium Java

Опубликовано: 01 Октябрь 2024
на канале: Automation Step by Step
83,397
1k

Today we will learn - How to implement Page Object Model
1. How to implement POM
What is POM

Design Principle

Create separate Object Repository to store object locators

For each web page there should be a separate page class

The page class will have all object locators and preferably action methods for the corresponding page

Step 1 : Create a class for each web page

Step 2 : Add object locators

Step 3 : Add action methods

Step 4 : Create class for test case

Step 5 : Create object for page class

Step 6 : Refer action methods

Benefits of POM

Test Objects and Functions are separated for easy maintenance and keeping the code clean

Objects are kept separated from test scripts and can be used multiple times in multiple tests

Every unique object locator is created only once

Easy Maintenance and Less Rework

#SeleniumJavaFramework #SeleniumTutorials #SeleniumTraining #SeleniumFramework #SeleniumJavaTutorial #SeleniumBeginnerTraining

PLAYLISTS

SELENIUM BEGINNERS
   • Selenium Beginner Tutorial  

SELENIUM JAVA FRAMEWORK BEGINNERS
   • Selenium Java Framework for Beginners  

JAVA
   • Java  

JENKINS
   • Jenkins  

JMETER
   • JMeter Beginner  

GIT & GITHUB
   • Git and GitHub  

DOCKER
   • Docker  

ROBOT FRAMEWORK
   • Robot Framework Beginner Tutorial  

KATALON STUDIO
   • Katalon Studio  

WEB SERVICES (API)
   • API Web Services  

Like on FACEBOOK :
  / automationstepbystep  

Follow on TWITTER:
  / automationsbs  

Subscribe on YOUTUBE :
   / automationstepbystep  

_______ ONLINE COURSES TO LEARN _______

https://automationstepbystep.com/

Like, Subscribe & Share
You can support my mission for education by sharing this knowledge and helping as many people as you can

Never Stop Learning
Raghav
https://automationstepbystep.com/