diff --git a/pages/exercises_ru_words_page.py b/pages/exercises_ru_words_page.py index 97ddd4991b..6768e52022 100644 --- a/pages/exercises_ru_words_page.py +++ b/pages/exercises_ru_words_page.py @@ -1,13 +1,13 @@ """Methods for verifying web elements on the 'Exercises "Words"' page on the 'ru' local""" import time - import allure from pages.base_page import BasePage -from locators.exercises_ru_words_page_locators import ExercisesRuWordsPageLocators +from locators.exercises_ru_words_page_locators import ExercisesRuWordsPageLocators, HeaderLocators class ExercisesRuWordsPage(BasePage): locators = ExercisesRuWordsPageLocators + locators1 = HeaderLocators # Checking the structure and display of elements on the page @allure.step("Check if some content is present in DOM") @@ -22,7 +22,7 @@ def check_visibility_of_page_content(self): def get_structure_of_1st_level(self): elements = self.elements_are_present(self.locators.PAGE_FIRST_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 1st level of nesting are visible") @@ -33,7 +33,7 @@ def check_elements_visibility_on_1st_level(self): def get_structure_of_2nd_level(self): elements = self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 2nd level of nesting are visible") @@ -44,7 +44,7 @@ def check_elements_visibility_on_2nd_level(self): def get_structure_of_3rd_level(self): elements = self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 3rd level of nesting are visible") @@ -55,7 +55,7 @@ def check_elements_visibility_on_3rd_level(self): def get_structure_of_4th_level(self): elements = self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 4th level of nesting are visible") @@ -66,7 +66,7 @@ def check_elements_visibility_on_4th_level(self): def get_structure_of_5th_level(self): elements = self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 5th level of nesting are visible") @@ -77,7 +77,7 @@ def check_elements_visibility_on_5th_level(self): def get_structure_of_6th_level(self): elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 6th level of nesting are visible") @@ -88,7 +88,7 @@ def check_elements_visibility_on_6th_level(self): def get_structure_of_7th_level(self): elements = self.elements_are_present(self.locators.PAGE_SEVENTH_LEVEL_ELEMENTS) tags = [element.tag_name for element in elements] - print(tags) + # print(tags) return elements @allure.step("Check if elements of the 7th level of nesting are visible") @@ -119,4 +119,6 @@ def check_list2_visibility(self): # Checking text on the tab&page @allure.step("Get value of the title of the tab") def get_value_of_tab_title(self): - return self.get_current_tab_title() + tab_title = self.get_current_tab_title() + print(tab_title) + return tab_title diff --git a/test_data/exercises_ru_words_page_data.py b/test_data/exercises_ru_words_page_data.py index dcbaf77623..e5b483566b 100644 --- a/test_data/exercises_ru_words_page_data.py +++ b/test_data/exercises_ru_words_page_data.py @@ -2,4 +2,4 @@ class ExercisesRuWordsPageData: - tab_title = "Речевые упражнения (готовы для занятий) | BrainUp" + tab_title = ["Речевые упражнения (готовы для занятий) | BrainUp", "Speech exercises | BrainUp"] diff --git a/tests/exercises_ru_words_page_test.py b/tests/exercises_ru_words_page_test.py index 59e39fa373..1f501d4921 100644 --- a/tests/exercises_ru_words_page_test.py +++ b/tests/exercises_ru_words_page_test.py @@ -66,5 +66,5 @@ def test_erw_02_01_verify_tab_title(self, driver, exercises_ru_words_page_open): page = ExercisesRuWordsPage(driver) tab_title_value = page.get_value_of_tab_title() assert tab_title_value, "The title value of the tab is empty" - assert tab_title_value == ExercisesRuWordsPageData.tab_title, \ + assert tab_title_value in ExercisesRuWordsPageData.tab_title, \ "The title on the tab doesn't match the valid value"