Selenium Cucumber Java BDD Framework Class 6: Page Object Model

preview_player
Показать описание
Page Object Model :
-------------------
1 - What is POM - Page Object Model
2 - Advantages of POM
3 - How to implement POM in Selenium Cucumber Framework

What is POM?

- Design pattern to create Object Repository
- A class is created for each page to identify web elements of that page
- Also contains methods to do action on the objects
- Separates test objects and test scripts

Advantages of POM?

- Makes code maintainable changes and updates are easier
- makes code reusable
- improve readability provide a kind of object documentation at a single place.
- it will save time and efforts
- it will avoid rework code
- it will makes tests less brittle
- new tests creation is easier and faster
- improve overall quality and efficiency

Step 1 - Create a class for each page
Step 2 - Create locators of all objects to be used in that page
Step 3 - Create methods or actions to be performed on the objects
Step 4 - Refer in the test scripts
Step 5 - Run and validate
Рекомендации по теме
Комментарии
Автор

Hi, nicely explained. But am seeing an error - Failed to instantiate class

phanikiran