From d41c95ad7a2e5236a839dec00ede93b19ca60f76 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Wed, 13 Aug 2025 11:26:44 +0300 Subject: [PATCH] ref test_erw_03.06 Verify navigation on links update exercises_ru_words_page.py #433 --- pages/exercises_ru_words_page.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/pages/exercises_ru_words_page.py b/pages/exercises_ru_words_page.py index ff809f762e..67e9e69e68 100644 --- a/pages/exercises_ru_words_page.py +++ b/pages/exercises_ru_words_page.py @@ -1,5 +1,4 @@ """Methods for verifying web elements on the 'Exercises "Words"' page on the 'ru' local""" -import time import allure import requests from selenium.webdriver.support import expected_conditions as EC @@ -186,7 +185,7 @@ def click_on_breadcrumbs_links(self): self.element_is_present_and_clickable(self.locators.PAGE_LIST1_3).click() opened_pages.append(self.get_current_tab_url()) - print(*opened_pages, sep='\n') + # print(*opened_pages, sep='\n') return opened_pages @allure.step("Click on group links and thereby open corresponding web pages in the same tab") @@ -199,16 +198,15 @@ def click_on_group_links(self): Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url())) opened_pages.append(self.get_current_tab_url()) - print(*opened_pages, sep='\n') + # print(*opened_pages, sep='\n') return opened_pages @allure.step("Click on subgroup link 'Family' and thereby open corresponding web pages in the same tab") def click_on_subgroup_link_family(self): self.element_is_present_and_clickable(self.locators.PAGE_LIST3_1).click() - time.sleep(2) + Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url())) opened_page = self.get_current_tab_url() self.driver.back() - time.sleep(1) print(opened_page) return opened_page @@ -216,22 +214,18 @@ def click_on_subgroup_link_family(self): and thereby open corresponding web pages in the same tab""") def click_on_subgroup_link_beloved_home_food_clothes(self): opened_pages = [] - time.sleep(2) self.element_is_present_and_clickable(self.locators.PAGE_LIST3_2).click() - time.sleep(2) + Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url())) opened_pages.append(self.get_current_tab_url()) self.driver.back() - time.sleep(2) self.element_is_present_and_clickable(self.locators.PAGE_LIST3_3).click() - time.sleep(2) + Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url())) opened_pages.append(self.get_current_tab_url()) self.driver.back() - time.sleep(2) self.element_is_present_and_clickable(self.locators.PAGE_LIST3_4).click() - time.sleep(2) + Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url())) opened_pages.append(self.get_current_tab_url()) self.driver.back() - time.sleep(2) print(*opened_pages, sep='\n') return opened_pages