import logging import allure from assertpy import assert_that from ui_automation_framework.core import BasePage, TestStatus from ui_automation_framework.utils import CoreConfig from ui_automation_framework.utils import logger as cl class TopFiltrPlaylistsPage(BasePage): log = cl.Logger(logging.DEBUG) def __init__(self, driver): super().__init__(driver) self.driver = driver self.ts = TestStatus(self.driver) @allure.step("Page header is present") def header_is_present(self): locator = "//span[contains(text(),'Top Filtr Playlists')]" self.wait_for_element_visible(locator=locator, locator_type="xpath") summary = self.is_element_displayed(locator=locator, locator_type="xpath") assert_that(summary).is_true() @allure.step("Navigating to the top filtr playlists page") def open_top_filtr_page(self): self.driver.get(CoreConfig.ENV_BASE_URL + "/spotify/filtr-playlists") self.page_has_loaded()