From 3cb69da7cea0b47a08b7145268c3f24b4bd21d62 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Thu, 21 Aug 2025 13:19:05 +0300 Subject: [PATCH] update exercises_ru_words_page.py #433 --- pages/exercises_ru_words_page.py | 33 +------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/pages/exercises_ru_words_page.py b/pages/exercises_ru_words_page.py index 79b3c02dc9..5d8428c39e 100644 --- a/pages/exercises_ru_words_page.py +++ b/pages/exercises_ru_words_page.py @@ -162,9 +162,8 @@ def get_subgroup_link_titles(self): @allure.step("Get attribute 'href' of subgroup links") def get_subgroup_links_href(self): - subgroup_links_href = [element.get_attribute("href") for element in self.get_list3_of_subgroup_links()] # print(len(subgroup_links_href), *subgroup_links_href, sep='\n') - return subgroup_links_href + return [element.get_attribute("href") for element in self.get_list3_of_subgroup_links()] @allure.step("Get status code of subgroup links") def get_subgroup_link_status_codes(self): @@ -198,35 +197,6 @@ 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') - 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() - Wait(self.driver, self.timeout).until(EC.url_changes(self.get_current_tab_url())) - opened_page = self.get_current_tab_url() - self.driver.back() - print(opened_page) - return opened_page - - @allure.step("""Click on subgroup links 'Beloved Home', 'Food', 'Clothes' - and thereby open corresponding web pages in the same tab""") - def click_on_subgroup_link_beloved_home_food_clothes(self): - opened_pages = [] - self.element_is_present_and_clickable(self.locators.PAGE_LIST3_2).click() - 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() - self.element_is_present_and_clickable(self.locators.PAGE_LIST3_3).click() - 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() - self.element_is_present_and_clickable(self.locators.PAGE_LIST3_4).click() - 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() - print(*opened_pages, sep='\n') return opened_pages @allure.step("""Click on subgroup links and thereby open corresponding web pages in the same tab""") @@ -243,7 +213,6 @@ def click_on_subgroup_links(self): self.driver.back() Wait(self.driver, self.timeout).until(EC.url_to_be(group_page_url)) - print(*opened_pages, sep='\n') return opened_pages # Checking images on the page