Python Page Object Model in Selenium Webdriver Step by Step Guide

Опубликовано: 26 Октябрь 2017
на канале: Specialize Automation
30,707
247

Learn in depth about Page object model framework in Selenium and how to implement it in Python using Pycharm step by step.

POM framework in Python Selenium,
Creating Page object model in selenium python,
Creatimg POM framework in selenium python,
How to design page object model in python selenium,
How to create page object model in python selenium,
POM design pattern in Selenium using Python,


What is POM?
Page Object Model is a design pattern to create Object Repository for web UI elements.
Under this model, for each web page in the application, there should be corresponding page class.
This Page class will find the WebElements of that web page and also contains Page methods which perform operations on those WebElements.
Name of these methods should be given as per the task they are performing

Advantages of POM
Page Object Patten says operations and flows in the UI should be separated from verification. This concept makes our code cleaner and easy to understand.
The Second benefit is the object repository is independent of test cases, so we can use the same object repository for a different purpose with different tools. For example, we can integrate POM with TestNG/JUnit for functional Testing and at the same time with JBehave/Cucumber for acceptance testing.
Code becomes less and optimized because of the reusable page methods in the POM classes.
Methods get more realistic names which can be easily mapped with the operation happening in UI. i.e. if after clicking on the button we land on the home page, the method name will be like 'gotoHomePage()'.


Linkedin:   / aditya-kumar-roy-b3673368  
Facebook:   / specializeautomation  
Code Link : https://drive.google.com/file/d/1mMx5...