Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locators/exercises_ru_words_page_locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ExercisesRuWordsPageLocators:
PAGE_SEVENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*")
PAGE_LIST1 = (By.XPATH, '//ul[@aria-label="Breadcrumbs"]//a')
# PAGE_LIST1 = (By.XPATH, "//main//div/li")
PAGE_LIST2 = (By.XPATH, "//aside//li")
PAGE_LIST2 = (By.XPATH, "//aside//button")
PAGE_LIST3 = (By.XPATH, '//div[contains(@class, "series-page")]//a')
# PAGE_LIST3 = (By.XPATH, "//main//div/a")
CARD_IMAGES_LIST4 = (By.XPATH, '//div[contains(@style, "svg")]')
Expand Down
5 changes: 4 additions & 1 deletion pages/exercises_ru_words_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def check_list2_visibility(self):
def check_list3_presence(self):
elements = self.elements_are_present(self.locators.PAGE_LIST3)
# tags = [element.tag_name for element in elements]
# tags_text = [element.text for element in elements]
return elements

@allure.step("Check the list3 is visible")
Expand Down Expand Up @@ -169,3 +168,7 @@ def get_breadcrumbs_links_href(self):
@allure.step("Get status code of links")
def get_link_status_codes_in_breadcrumbs(self):
return [requests.head(link_href).status_code for link_href in self.get_breadcrumbs_links_href()]

@allure.step("Check if group links are clickable")
def check_group_links_clickability(self):
return all(link.is_enabled() for link in self.check_list2_presence())
6 changes: 6 additions & 0 deletions tests/exercises_ru_words_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,9 @@ def test_erw_03_01_verify_breadcrumbs_links(self, driver, exercises_ru_words_pag
"Attributes 'href' of links in breadcrumbs mismatch the valid values"
assert all(el == ExercisesRuWordsPageData.links_status_code for el in breadcrumbs_link_status_codes), \
"Status codes of links in breadcrumbs mismatch valid values"

@allure.title("Verify clickability of group links on the page")
def test_erw_03_02_verify_group_links_text(self, driver, exercises_ru_words_page_open):
page = ExercisesRuWordsPage(driver)
group_links_clickability = page.check_group_links_clickability()
assert group_links_clickability, "Group links are unclickable"
Loading