Skip to content

Commit 64eea15

Browse files
ref test_hpu_03.02 verify unauth links navigation
update header_page.py, conftest.py
1 parent 829be07 commit 64eea15

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pages/header_page.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,11 @@ def click_on_internal_links_in_header_unauth(self):
339339
# Click on the 'Contacts', 'Specialists', 'Contributors', 'Used Resources' links
340340
for link in self.get_list_of_internal_links_in_more():
341341
self.click_more_button()
342+
current_url = self.get_current_tab_url()
342343
link.click()
343-
time.sleep(1)
344+
Wait(self.driver, 10).until(EC.url_changes(current_url))
344345
opened_pages.append(self.get_current_tab_url())
346+
print(*opened_pages, sep='\n') # Temporarily for debugging
345347
return opened_pages
346348

347349
@allure.step("""Click on internal links in the Header and thereby open corresponding web pages in the same tab

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,12 @@ def used_resources_page_open(driver, main_page_open):
150150
def auto_test_user_authorized(driver, main_page_open):
151151
page = BasePage(driver)
152152
page.element_is_present_and_clickable(MainPageLocators.LOGIN_BUTTON).click()
153+
print("Current URL:", driver.current_url) # Temporarily for debugging
153154
page.element_is_visible(LoginPageLocators.INPUT_LOGIN).send_keys(os.environ["LOGIN"])
154155
page.element_is_visible(LoginPageLocators.INPUT_PASSWORD).send_keys(os.environ["PASSWORD"])
155156
page.element_is_present_and_clickable(LoginPageLocators.SIGN_IN_BUTTON).click()
156157
page.check_expected_link(MainPageLinks.URL_GROUPS_PAGE)
158+
print("Current URL:", driver.current_url) # Temporarily for debugging
157159
page = ProfilePage(driver)
158160
page.loader_checking()
159161

0 commit comments

Comments
 (0)