Skip to content

Issue_402_GROUPS_PAGE_text #553

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 30, 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
8 changes: 4 additions & 4 deletions pages/groups_page.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Methods for verifying web elements on the 'Groups' page"""
import time
import allure
import requests
from selenium.webdriver.common.by import By
Expand Down Expand Up @@ -133,12 +132,13 @@ def get_value_of_page_title_en(self):

@allure.step("Get the list of subtitle 'h4' values on the 'ru' local")
def get_values_of_subtitles_ru(self):
time.sleep(1)
return [subtitle.text for subtitle in self.get_list_of_subtitles()]
elements = self.get_list_of_subtitles()
Wait(self.driver, 10).until(EC.visibility_of_all_elements_located(self.locators.PAGE_SUBTITLES))
return [element.text for element in elements]

@allure.step("Get the list of subtitle 'h4' values on the 'en' local")
def get_values_of_subtitles_en(self):
return [subtitle.text for subtitle in self.get_list_of_subtitles()]
return [element.text for element in self.get_list_of_subtitles()]

@allure.step("Get the list of links on the 3rd level of nesting on the page")
def get_list_of_links(self):
Expand Down
2 changes: 0 additions & 2 deletions tests/groups_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def test_gp_03_04_verify_links_en(self, driver, groups_en_page_open):
def test_gp_03_05_verify_ru_links_lead_to_proper_pages(self, driver, groups_ru_page_open):
page = gPage(driver)
opened_pages = page.click_on_links_on_ru_local()
print(opened_pages) # Temporarily for refactoring
assert opened_pages, "Transitions to exercises pages have not performed"
assert all(element in gPD.pages_urls for element in opened_pages), \
"Some links lead to incorrect pages after clicking"
Expand All @@ -163,7 +162,6 @@ def test_gp_03_05_verify_ru_links_lead_to_proper_pages(self, driver, groups_ru_p
def test_gp_03_06_verify_en_links_lead_to_proper_pages(self, driver, groups_en_page_open):
page = gPage(driver)
opened_pages = page.click_on_links_on_en_local()
print(opened_pages) # Temporarily for refactoring
assert opened_pages, "Transitions to exercises pages have not performed"
assert all(element in gPD.pages_urls for element in opened_pages), \
"Some links lead to incorrect pages after clicking"
Expand Down
Loading