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
6 changes: 3 additions & 3 deletions locators/exercises_ru_words_family_page_locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class ExercisesRuWordsFamilyPageLocators:
PAGE_TWELFTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*/*/*/*")
PAGE_THIRTEENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*/*/*/*/*")
PAGE_FOURTEENTH_LEVEL_ELEMENTS = (By.XPATH, "//main/*/*/*/*/*/*/*/*/*/*/*/*/*/*")
PAGE_LIST1 = (By.XPATH, '//ul[@aria-label="Breadcrumbs"]//a')
PAGE_LIST2 = (By.XPATH, "//aside//button")
PAGE_LIST3 = (By.XPATH, '//div[contains(@class, "series-page")]//a')
PAGE_LIST1_BREADCRUMBS = (By.XPATH, '//ul[@aria-label="Breadcrumbs"]//a')
PAGE_LIST2_SERIES = (By.XPATH, "//aside//button")
PAGE_LIST3_EXERCISES = (By.XPATH, '//div[contains(@class, "series-page")]//a')
10 changes: 5 additions & 5 deletions pages/exercises_ru_words_family_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,25 @@ def check_elements_visibility_on_14th_level(self):

@allure.step("Check the list1 on the 5th level of nesting is present on the page")
def get_list1_of_breadcrumbs_links(self):
return self.elements_are_present(self.locators.PAGE_LIST1)
return self.elements_are_present(self.locators.PAGE_LIST1_BREADCRUMBS)

@allure.step("Check the list1 is visible")
def check_list1_visibility(self):
return all(element.is_displayed() for element in self.get_list1_of_breadcrumbs_links())

@allure.step("Check the list2 on the 5th level of nesting is present on the page")
def get_list2_of_series_links(self):
return self.elements_are_present(self.locators.PAGE_LIST2)
return self.elements_are_present(self.locators.PAGE_LIST2_SERIES)

@allure.step("Check the list2 is visible")
def check_list2_visibility(self):
return all(element.is_displayed() for element in self.get_list2_of_series_links())

@allure.step("Check the list3 on the 11th level of nesting is present on the page")
def get_list3_of_exercises_links(self):
elements = self.elements_are_present(self.locators.PAGE_LIST3)
att = [element.get_attribute("title") for element in elements]
print(*att, len(att), sep='\n')
elements = self.elements_are_present(self.locators.PAGE_LIST3_EXERCISES)
# att = [element.get_attribute("title") for element in elements]
# print(*att, len(att), sep='\n')
return elements

@allure.step("Check the list3 is visible")
Expand Down
Loading