Skip to content

Issue_433_EXERCISES_WORDS_RU_PAGE_test #547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
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
12 changes: 0 additions & 12 deletions pages/exercises_ru_words_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ 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)
return elements

@allure.step("Check if elements of the 1st level of nesting are visible")
Expand All @@ -34,7 +33,6 @@ 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)
return elements

@allure.step("Check if elements of the 2nd level of nesting are visible")
Expand All @@ -45,7 +43,6 @@ 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)
return elements

@allure.step("Check if elements of the 3rd level of nesting are visible")
Expand All @@ -56,7 +53,6 @@ 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)
return elements

@allure.step("Check if elements of the 4th level of nesting are visible")
Expand All @@ -67,7 +63,6 @@ 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)
return elements

@allure.step("Check if elements of the 5th level of nesting are visible")
Expand All @@ -78,7 +73,6 @@ 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)
return elements

@allure.step("Check if elements of the 6th level of nesting are visible")
Expand All @@ -89,7 +83,6 @@ 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)
return elements

@allure.step("Check if elements of the 7th level of nesting are visible")
Expand All @@ -100,7 +93,6 @@ def check_elements_visibility_on_7th_level(self):
def get_list1_of_breadcrumbs_links(self):
elements = self.elements_are_present(self.locators.PAGE_LIST1)
tags = [element.tag_name for element in elements]
# print(*tags)
return elements

@allure.step("Check the list1 is visible")
Expand All @@ -111,7 +103,6 @@ def check_list1_visibility(self):
def get_list2_of_group_links(self):
elements = self.elements_are_present(self.locators.PAGE_LIST2)
tags = [element.tag_name for element in elements]
# print(*tags)
return elements

@allure.step("Check the list2 is visible")
Expand All @@ -122,7 +113,6 @@ def check_list2_visibility(self):
def get_list3_of_subgroup_links(self):
elements = self.elements_are_present(self.locators.PAGE_LIST3)
tags = [element.tag_name for element in elements]
# print(*tags)
return elements

@allure.step("Check the list3 is visible")
Expand All @@ -133,7 +123,6 @@ def check_list3_visibility(self):
def get_list4_of_links(self):
elements = self.elements_are_present(self.locators.CARD_IMAGES_LIST4)
tags = [element.tag_name for element in elements]
# print(*tags)
return elements

@allure.step("Check the list4 is visible")
Expand All @@ -144,7 +133,6 @@ def check_list4_visibility(self):
@allure.step("Get value of the title of the tab")
def get_value_of_tab_title(self):
tab_title = self.get_current_tab_title()
print(tab_title)
return tab_title

@allure.step("Get value of the breadcrumbs on the page")
Expand Down
23 changes: 22 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from locators.contacts_page_locators import ContactsPageLocators
from locators.contributors_page_locators import ContributorsPageLocators
from locators.exercises_ru_similar_phrases_page_locators import ExercisesRuSimilarPhrasesPageLocators as erspPL
from locators.exercises_ru_words_page_locators import ExercisesRuWordsPageLocators as erwPL
from locators.groups_page_locators import GroupsPageLocators
from locators.header_page_locators import HeaderUnauthorizedLocators as huLocators
from locators.login_page_locators import LoginPageLocators
Expand Down Expand Up @@ -100,11 +101,31 @@ def page_fully_loaded(driver):

@pytest.fixture()
@allure.step(f'Open page: {ExercisesUrls.URL_EXERCISES_RU_WORDS_PAGE}')
def exercises_ru_words_page_open(driver, groups_ru_page_open):
def exercises_ru_words_page_open1(driver, groups_ru_page_open):
driver.get(ExercisesUrls.URL_EXERCISES_RU_WORDS_PAGE)
time.sleep(3)


@pytest.fixture()
@allure.step(f'Open page: {ExercisesUrls.URL_EXERCISES_RU_WORDS_PAGE} on the "ru" local')
def exercises_ru_words_page_open(driver, groups_ru_page_open):
driver.get(ExercisesUrls.URL_EXERCISES_RU_WORDS_PAGE)

def page_fully_loaded(driver):
ready_state = driver.execute_script("return document.readyState")
if ready_state != "complete":
return False

try:
content = driver.find_element(*erwPL.PAGE_LIST3)
return content.is_displayed()
except NoSuchElementException:
return False

Wait(driver, timeout=10).until(page_fully_loaded)
Wait(driver, 10).until(EC.presence_of_all_elements_located(erwPL.PAGE_LIST3))


@pytest.fixture()
@allure.step(f'Open page: {MainPageLinks.URL_LOGIN_PAGE}')
def login_page_open(driver, main_page_open):
Expand Down
Loading