Skip to content

Commit

Permalink
Extract superclass
Browse files Browse the repository at this point in the history
  • Loading branch information
MatMoore committed Feb 14, 2024
1 parent 272f121 commit ca287f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/selenium/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ def screenshot(name="screenshot"):
yield screenshot


class DetailsPage:
class Page:
def __init__(self, selenium):
self.selenium = selenium


class DetailsPage(Page):
def secondary_heading(self):
return self.selenium.find_element(By.TAG_NAME, "h2")


class HomePage:
class HomePage(Page):
def __init__(self, selenium):
self.selenium = selenium

Expand All @@ -64,7 +66,7 @@ def link(self):
return self.element.find_element(By.CSS_SELECTOR, "h3 a")


class SearchPage:
class SearchPage(Page):
def __init__(self, selenium):
self.selenium = selenium

Expand Down

0 comments on commit ca287f9

Please sign in to comment.