Search code snippets, questions, articles...

[Python] Inheritance and adding variable. Page object example

# page object of Dashboard page. SitePAge - parent class
class SiteDashboardPage(SitePage):
    PAGE_TITLE = (By.CLASS_NAME, 'page-title')

    def __init__(self, browser):
        SitePage.__init__(self, browser)
        self.page_title = self.browser.find_element(*self.PAGE_TITLE).text
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Was this helpful?