Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions locators/header_page_locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class HeaderAuthorizedLocators:
HEADER_ICONS = (By.XPATH, "//nav//*[name()='svg']")
HEADPHONE_ICON = (By.XPATH, "(//nav//*[name()='svg'])[2]")
LINK_ABOUT_AUTH = (By.XPATH, "(//nav//a)[4]")
LINK_ABOUT_AUTH2 = (By.XPATH, "(//nav//a)[8]")
LINK_DONATE_AUTH = (By.XPATH, "(//nav//a)[10]")
LINK_GITHUB_AUTH = (By.XPATH, "(//nav//a)[11]")
LINK_GROUPS_AUTH = (By.XPATH, "(//nav//a)[2]")
Expand Down
10 changes: 9 additions & 1 deletion pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def click_on_direct_internal_links_in_header_auth(self):
Wait(self.driver, 10).until(EC.url_changes(current_url))
current_url = self.get_current_tab_url()
opened_pages.append(current_url) # to be continued
print(opened_pages)
# print(opened_pages)

return opened_pages

Expand All @@ -430,6 +430,14 @@ def click_on_Statistics_link_auth2(self):
self.click_more_button()
self.element_is_present_and_clickable(self.locators1.LINK_STATISTICS_AUTH2).click()
current_tab_url = self.get_current_tab_url()
# print(current_tab_url)
return current_tab_url

@allure.step("Click on the 'About' link #2 for authorized user")
def click_on_About_link_auth2(self):
self.click_more_button()
self.element_is_present_and_clickable(self.locators1.LINK_ABOUT_AUTH2).click()
current_tab_url = self.get_current_tab_url()
print(current_tab_url)
return current_tab_url

Expand Down
7 changes: 7 additions & 0 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ def test_hpa_03_02_03_verify_auth_statistics_link2_navigation(self, driver, auto
opened_page2 = page.click_on_Statistics_link_auth2()
assert opened_page2 in hPD.set_auth, "The Statistics link #2 leads to an incorrect page after clicking"

@allure.title("""test_hpa.03.02.04 Verify if internal 'About' link #2 in the Header
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_02_04_verify_auth_about_link2_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page2 = page.click_on_About_link_auth2()
assert opened_page2 in hPD.set_auth, "The About link #2 leads to an incorrect page after clicking"

@pytest.mark.skip("Unstable test environment")
@allure.title("""Verify if external links in the Header for an authorized user
lead to correct pages after click""")
Expand Down
Loading