From c7e914b501ccebd4aada8dd7446249f35a18e1fe Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Mon, 26 May 2025 13:44:22 +0300 Subject: [PATCH] update groups_page.py --- pages/groups_page.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/pages/groups_page.py b/pages/groups_page.py index dd2ccc741d..a07efc6143 100644 --- a/pages/groups_page.py +++ b/pages/groups_page.py @@ -111,8 +111,10 @@ def get_list_of_images(self): @allure.step("Check if images on the 6th level of nesting are visible") def check_visibility_of_images(self): - time.sleep(3) - return all(element.is_displayed() for element in self.get_list_of_images()) + elements = self.get_list_of_images() + for element in elements: + WebDriverWait(self.driver, 10).until(ec.visibility_of(element)) + return all(element.is_displayed() for element in elements) @allure.step("Get the list of subtitles on the 6th level of nesting on the page") def get_list_of_subtitles(self): @@ -148,17 +150,6 @@ def get_values_of_subtitles_ru(self): def get_values_of_subtitles_en(self): return [subtitle.text for subtitle in self.get_list_of_subtitles()] - # Checking links and buttons on the page - # @allure.step("Click on the 'ru' button in the Header for every user") - # def click_on_ru_button(self): - # self.element_is_present_and_clickable(self.locators1.RU_BUTTON).click() - # time.sleep(4) - - # @allure.step("Click on the 'en' button in the Header for every user") - # def click_on_en_button(self): - # self.element_is_present_and_clickable(self.locators1.EN_BUTTON).click() - # time.sleep(4) - @allure.step("Get the list of links on the 3rd level of nesting on the page") def get_list_of_links(self): return self.elements_are_present(self.locators.PAGE_LINKS)