Skip to content

Commit ec3e439

Browse files
ref test_gp_02_05_verify_ru_page_subtitles
update groups_page_test.py, groups_page.py
1 parent c63b662 commit ec3e439

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

pages/groups_page.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Methods for verifying web elements on the 'Groups' page"""
2-
import time
32
import allure
43
import requests
54
from selenium.webdriver.common.by import By
@@ -133,12 +132,13 @@ def get_value_of_page_title_en(self):
133132

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

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

143143
@allure.step("Get the list of links on the 3rd level of nesting on the page")
144144
def get_list_of_links(self):

tests/groups_page_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def test_gp_03_04_verify_links_en(self, driver, groups_en_page_open):
154154
def test_gp_03_05_verify_ru_links_lead_to_proper_pages(self, driver, groups_ru_page_open):
155155
page = gPage(driver)
156156
opened_pages = page.click_on_links_on_ru_local()
157-
print(opened_pages) # Temporarily for refactoring
158157
assert opened_pages, "Transitions to exercises pages have not performed"
159158
assert all(element in gPD.pages_urls for element in opened_pages), \
160159
"Some links lead to incorrect pages after clicking"
@@ -163,7 +162,6 @@ def test_gp_03_05_verify_ru_links_lead_to_proper_pages(self, driver, groups_ru_p
163162
def test_gp_03_06_verify_en_links_lead_to_proper_pages(self, driver, groups_en_page_open):
164163
page = gPage(driver)
165164
opened_pages = page.click_on_links_on_en_local()
166-
print(opened_pages) # Temporarily for refactoring
167165
assert opened_pages, "Transitions to exercises pages have not performed"
168166
assert all(element in gPD.pages_urls for element in opened_pages), \
169167
"Some links lead to incorrect pages after clicking"

0 commit comments

Comments
 (0)