diff --git a/pages/groups_page.py b/pages/groups_page.py index 5883b2705a..8a85078eef 100644 --- a/pages/groups_page.py +++ b/pages/groups_page.py @@ -34,7 +34,6 @@ def check_elements_visibility_on_1st_level(self): @allure.step("Get structure of the 2nd level of nesting on the page") def get_structure_of_2nd_level(self): - # tags = [element.tag_name for element in elements] return self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS) @allure.step("Check if elements of the 2nd level of nesting are visible") @@ -43,7 +42,6 @@ def check_elements_visibility_on_2nd_level(self): @allure.step("Get structure of the 3rd level of nesting on the page") def get_structure_of_3rd_level(self): - # tags = [element.tag_name for element in elements] return self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS) @allure.step("Check if elements of the 3rd level of nesting are visible") @@ -52,7 +50,6 @@ def check_elements_visibility_on_3rd_level(self): @allure.step("Get structure of the 4th level of nesting on the page") def get_structure_of_4th_level(self): - # tags = [element.tag_name for element in elements] return self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS) @allure.step("Check if elements of the 4th level of nesting are visible") @@ -61,7 +58,6 @@ def check_elements_visibility_on_4th_level(self): @allure.step("Get structure of the 5th level of nesting on the page") def get_structure_of_5th_level(self): - # tags = [element.tag_name for element in elements] return self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS) @allure.step("Check if elements of the 5th level of nesting are visible") @@ -70,14 +66,11 @@ def check_elements_visibility_on_5th_level(self): @allure.step("Get structure of the 6th level of nesting on the page") def get_structure_of_6th_level(self): - elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS) - # tags = [element.tag_name for element in elements] - return elements + return self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS) @allure.step("Check if elements of the 6th level of nesting are visible") def check_elements_visibility_on_6th_level(self): - elements = self.get_structure_of_6th_level() - return all(element.is_displayed() for element in elements) + return all(element.is_displayed() for element in self.get_structure_of_6th_level()) @allure.step("Check the title h3 on the 2nd level of nesting is present on the page") def check_title_presence(self): @@ -97,13 +90,11 @@ def check_visibility_of_tiles(self): @allure.step("Get the list of images on the 6th level of nesting on the page") def get_list_of_images(self): - elements = self.elements_are_present(self.locators.PAGE_IMAGES) - return elements + return self.elements_are_present(self.locators.PAGE_IMAGES) @allure.step("Check if images on the 6th level of nesting are visible") def check_visibility_of_images(self): - elements = self.get_list_of_images() - return all(element.is_displayed() for element in elements) + return all(element.is_displayed() for element in self.get_list_of_images()) @allure.step("Get the list of subtitles on the 6th level of nesting on the page") def get_list_of_subtitles(self): diff --git a/pages/header_page.py b/pages/header_page.py index c168b9ff21..181ac985a1 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -342,7 +342,6 @@ def click_on_internal_links_in_header_unauth(self): link.click() Wait(self.driver, 10).until(EC.url_changes(current_url)) opened_pages.append(self.get_current_tab_url()) - print(*opened_pages, sep='\n') # Temporarily for debugging return opened_pages @allure.step("""Click on internal links in the Header and thereby open corresponding web pages in the same tab @@ -362,7 +361,6 @@ def click_on_internal_links_in_header_auth(self): link.click() Wait(self.driver, 10).until(EC.url_changes(current_url)) opened_pages.append(self.get_current_tab_url()) - print(*opened_pages, sep='\n') # Temporarily for debugging return opened_pages @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs diff --git a/tests/conftest.py b/tests/conftest.py index 3d72267e41..7be248a657 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -150,11 +150,9 @@ def used_resources_page_open(driver, main_page_open): def auto_test_user_authorized(driver, main_page_open): page = BasePage(driver) page.element_is_present_and_clickable(MainPageLocators.LOGIN_BUTTON).click() - print("Current URL:", driver.current_url) # Temporarily for debugging page.element_is_visible(LoginPageLocators.INPUT_LOGIN).send_keys(os.environ["LOGIN"]) page.element_is_visible(LoginPageLocators.INPUT_PASSWORD).send_keys(os.environ["PASSWORD"]) page.element_is_present_and_clickable(LoginPageLocators.SIGN_IN_BUTTON).click() - print("Current URL:", driver.current_url) # Temporarily for debugging page.check_expected_link(MainPageLinks.URL_GROUPS_PAGE) print("Current URL:", driver.current_url) # Temporarily for debugging page = ProfilePage(driver)