diff --git a/locators/exercises_ru_words_family_page_locators.py b/locators/exercises_ru_words_family_page_locators.py index aa9490051d..bb1f0b0377 100644 --- a/locators/exercises_ru_words_family_page_locators.py +++ b/locators/exercises_ru_words_family_page_locators.py @@ -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') diff --git a/pages/exercises_ru_words_family_page.py b/pages/exercises_ru_words_family_page.py index e3d43ec4db..ed749dd21d 100644 --- a/pages/exercises_ru_words_family_page.py +++ b/pages/exercises_ru_words_family_page.py @@ -134,7 +134,7 @@ 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): @@ -142,7 +142,7 @@ def check_list1_visibility(self): @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): @@ -150,9 +150,9 @@ def check_list2_visibility(self): @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")