⚡ Python library provides page factory approach to implement page object model in selenium
MIT License
Python library provides page factory approach to implement page object model in selenium
pip install selenium-page-factory
Every Page in Page Object Model should have WebDriver object as class member as shown below
class PageClass(PageFactory):
def __init__(self,driver):
self.driver = driver # Required
self.timeout = 15 #(Optional - Customise your explicit wait for every webElement)
self.highlight = True #(Optional - To highlight every webElement in PageClass)
self.mobile_test = False #(Optional - Added for Appium support)
Note: Every WebElement will be created after verifying it's Presence and visibility on Page at Run-Time.
selenium-page-factory Documentation
Selenium Python Framework Example here